Start Process Using WEB API and get the Response with the Updated Variables

Hi All,

I am creating a WEB API which will in turn trigger a process model.

Now this is been executed, it contains 2 data store entities which gets updated.

now In order to send the response back to the External system My main intention is to send the 

variables which are updated while executing the process model into the response of the WEB API back,

Is this possible,

PS: My thought on this is .... this works on asynchronously where it just starts the process. but doesnt care if the process fails or not.

Please suggest

TIA :)

Harsha

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer
    Hi you shouldn't depend upon the activity chaining to get the updated variables values in web API.

    Because, a!startProcess() invokes a process asynchronously which means process might start immediately or with some delay based on scheduling algorithm/ based on load on server by considering load balancing.

    I know, when you chain the nodes, Appian tries to complete the execution of the chained node as quickly as possible but you cannot rely on that. As per appian documentation, they have clearly mentioned about startProcess function asynchronous behaviour.

    Hence, you cannot be sure about these process to start immediately, it's all your assumptions that it will start immediately, and this will drag your application into issues while it's in production.

    Also you can capture few details, whether process started successfully or failed using the following attributes of this function: onSuccess, onError

    I recommend you, not to rely on this approach, because this will be a temporary solution which won't work always. You need to think about some alternate options to achieve your requirement.
  • Thanks Alok,

    but what we are actually trying to do is .... we are having 2 script tasks and 2 WDSEs where based on some data validations we get the result pv get updated, and based on pv value we are showing the error message. We are not having a very big process in that....does it still fail or do we need to think of any other approach.
  • 0
    Certified Lead Developer
    in reply to harshav420
    Hi sometime even when you are not performing any complex logic, this might fail due to load on server. Because when we make asynchronous call means we are asking Appian to trigger this process, whenever applicable (based on the resource availability).

    So i suggest, do not rely on this, else you will end up with unexpected result/behavior/bugs at any point of time, and you can't even raise a support ticket, because as per the documentation it's the expected behavior, and i have seen several cases where this approach failed even when we perform very light operation.
Reply
  • 0
    Certified Lead Developer
    in reply to harshav420
    Hi sometime even when you are not performing any complex logic, this might fail due to load on server. Because when we make asynchronous call means we are asking Appian to trigger this process, whenever applicable (based on the resource availability).

    So i suggest, do not rely on this, else you will end up with unexpected result/behavior/bugs at any point of time, and you can't even raise a support ticket, because as per the documentation it's the expected behavior, and i have seen several cases where this approach failed even when we perform very light operation.
Children