We are currently performing maintenance on Appian Community. As a result, discussions posts and replies are temporarily unavailable. We appreciate your patience.

Return Robotic Task Results in an Interface

Certified Associate Developer

Hello, 
The documentation says I should be able to execute and return the results of a robotic task in an interface, but I'm having trouble figuring this out. My task is working correctly in the RPA, and I'm also able to run it in a process model, but I can't figure out the SAIL recipe to get the results in an interface. 
The farthest I've gotten is that I know I need to use a!testRunResultForId(), but it says I need to input the "Test run ID," and I don't know where to find that. Can someone help me out?

Thank you,

Jason

  Discussion posts and replies are publicly visible

  • I don't think there will be any need to use a!testRunResultForId() function. This function will give the results from the execution of startRuleTestsAll() and startRuleTestsApplications() smart services taking fv!testRunId from them after completion.

    For executing and returning results of a Robotic task in an interface you need to call your Execute Robotic Task Integration inside a saveInto of any component and save the ExecutionId of that task in a localVar by indexing. And you need to store the results of the robotic task using Retrieve Execution Results integration (which you must have already created) by passing the executionId in its parameter (create a rule input in the integration) in a local variable and allow that localVar to refresh until the executionId or the result is not null.

    For eg:

    local!executionResult: a!refreshVariable(
        value: if(
          isnull(local!executionId),
          null,
          rule!retriveExecutionResultIntegration(executionId: local!executionId)
        ),
        refreshInterval: if(isnull(fv!value), 0.5,null)
      )