Task is not correctly assigned

Certified Associate Developer

Hello All,

I have created a web API that initiated the process and generates a task for the use. This web API is called by third party application, Wherein they pass "username" as a parameter on the basis of which the process model executes.

Now inside the process model I'm using the username variable for the task assignment. For calling the Web API, I have created an unique user account which they use for authentication. As a result of which when the API is called, Its showing that account information as a process initiator(Which is fine) but the task is not getting assigned to the user whose value exists in "UserName" variable. However, If the same process model is initiated from Appian then it got assigned to correct user whose value exists in that variable

  Discussion posts and replies are publicly visible

Parents
  • Hi Vivek,

    To have a better look at what is happening, run an instance of the process by calling the Web API through your external system, monitor the instance in Appian and look into the following information inside process details:

    - Which pv! is set to hold the username that you passed as a parameter? (+ Is this process variable parameterised?)

    - What is the value of this pv! ?

    - When the task was assigned, who was it assigned to? (+ In the user task itself, what did you put for the assignment details?)

    From this information we'll be able to help a bit more

  • 0
    Certified Associate Developer
    in reply to Nathan Hunter

    Hello Nathan,

    I performed the said steps and here are my findings. Lets understand it with an example,

    Suppose  third party application is calling the appian Web API and for authentication they are using service account. Lets say username for the same is "WebServie" and in the queryParameter they are providing some username lets consider its "nathan_hunter"

    Now this WebAPI will initiate a process model. As a result of which the "WebService" will be shown as the process initiator. Inside that process model I have a variable called "UserName" it will hold the value "nathan_hunter" and the same variable is used in the assignment tab of Task Form.

    - Variable holding the value of username is of type user and it receives the value when the process is initiated

    - As per the above scenario this variable will hold the value "nathan_hunter"

    - The assignment shown is null in the case of Web API(Attaching screenshot)

    - The same "UserName" variable is used under assignment tab

Reply
  • 0
    Certified Associate Developer
    in reply to Nathan Hunter

    Hello Nathan,

    I performed the said steps and here are my findings. Lets understand it with an example,

    Suppose  third party application is calling the appian Web API and for authentication they are using service account. Lets say username for the same is "WebServie" and in the queryParameter they are providing some username lets consider its "nathan_hunter"

    Now this WebAPI will initiate a process model. As a result of which the "WebService" will be shown as the process initiator. Inside that process model I have a variable called "UserName" it will hold the value "nathan_hunter" and the same variable is used in the assignment tab of Task Form.

    - Variable holding the value of username is of type user and it receives the value when the process is initiated

    - As per the above scenario this variable will hold the value "nathan_hunter"

    - The assignment shown is null in the case of Web API(Attaching screenshot)

    - The same "UserName" variable is used under assignment tab

Children
No Data