Appian Community and Appian Academy are being upgraded. As a part of the upgrade, Appian Community is currently in read-only mode, and user registration is disabled until August 3. We apologize for any inconvenience this may cause, but a more secure, stable, and performant Community experience is coming soon!

The new Appian Community launches August 3, followed by Appian Academy on August 7. During the migration, Appian Community Edition, Appian Academy, Documentation, Certifications, Instructor-led Customer Training, Partner Sales Training & Accreditation, and Forum (for Appian Partners and Customers only) will remain available.

WEB API response not updating the process variable

I have one web api which is using a!startProcess to call the process async. As it is async and does not wait for process model to complete it is not updating the process variables in the response. 

What are the possible fixes we can do? 

  Discussion posts and replies are publicly visible

Parents
  • Hi  and  I have activity chaining but we have loop there.  I will explain the scenario in detail, consider we are creating 5 different cases in appian application sent from the external system. There is one process variable of type array which has 5 cases to create and for each one a loop will run inside the process we called from the API. In the response I need all the 5 case ids to be returned but it is returning 2 of them as nulls. 

    It would not have returned any of the case ids if activity chaining was not there.
    I suppose it is happening because process runs async and as we have loop the process variable is updated but before the 4th 5th iteration completes it returned the response.

    "cases" : [ {
    "caseId" : 375,
    "status" : "CREATED"
    }, {
    "caseId" : 376,
    "status" : "CREATED"
    }, {
    "caseId" : 377,
    "status" : "CREATED"
    }, {
    "caseId" : null,
    "status" : "CREATED"
    }, {
    "caseId" : null,
    "status" : "CREATED"
    }, {
    "caseId" : null,
    "status" : "CREATED"
    } ]
Reply
  • Hi  and  I have activity chaining but we have loop there.  I will explain the scenario in detail, consider we are creating 5 different cases in appian application sent from the external system. There is one process variable of type array which has 5 cases to create and for each one a loop will run inside the process we called from the API. In the response I need all the 5 case ids to be returned but it is returning 2 of them as nulls. 

    It would not have returned any of the case ids if activity chaining was not there.
    I suppose it is happening because process runs async and as we have loop the process variable is updated but before the 4th 5th iteration completes it returned the response.

    "cases" : [ {
    "caseId" : 375,
    "status" : "CREATED"
    }, {
    "caseId" : 376,
    "status" : "CREATED"
    }, {
    "caseId" : 377,
    "status" : "CREATED"
    }, {
    "caseId" : null,
    "status" : "CREATED"
    }, {
    "caseId" : null,
    "status" : "CREATED"
    }, {
    "caseId" : null,
    "status" : "CREATED"
    } ]
Children