Web API to Process model integration

 Hi Folks, 

 

I'm trying to achieve the following:

  • Create WebAPI for JSON request - this Web API accepts a JSON request 
  • After accepting a JSON-type input - a process model is initiated to which this JSON value is passed 
  • If the process initiation is successful, a success response is sent back as acknowledgement 

Any inputs would be great, as I'm just beginning, I can implement more efficient code.  

 

Thanks in advance!!

  Discussion posts and replies are publicly visible

Parents
  • Additionally to the steps, you have to keep in mind that you can configure the response on the web Api as you want, it could be based on the start of the process or you can validate structure, information, etc. within the web api.
  • Responding to an old thread as I ran in to a problem related to this.

    I have a Web API that accepts JSON request with few attributes. One of the attribute in the request is in JSON format and I ran in to issue while passing this value to process model. Below is the request format.

    "payload" attribute is mapped to a text variable in process model but the variable value is in dictionary format and not able to retrive each values from this variable (like Attribute2_2_1) in the process model.

    Is a there way I can retain the JSON format in process model variable ? I have already tried converting this to a JSON using a!toJson/a!fromJson but unable to convert the format. Thank you.


    {
    "Request":
    {
    "Attribute1":"value",
    "payload":
    {
    "Attribute2_1":"value",
    "Attribute2_2":
    {
    "Attribute2_2_1":"value",
    "Attribute2_2_2":"value"
    },
    "Attribute3":"value"
    }
    }
    }

    Value in Payload variable on Process Model:

    [payload:[Attribute2_1:value, Attribute2_2:[Attribute2_2_1:value, Attribute2_2_2:value], Attribute3:value]]
Reply
  • Responding to an old thread as I ran in to a problem related to this.

    I have a Web API that accepts JSON request with few attributes. One of the attribute in the request is in JSON format and I ran in to issue while passing this value to process model. Below is the request format.

    "payload" attribute is mapped to a text variable in process model but the variable value is in dictionary format and not able to retrive each values from this variable (like Attribute2_2_1) in the process model.

    Is a there way I can retain the JSON format in process model variable ? I have already tried converting this to a JSON using a!toJson/a!fromJson but unable to convert the format. Thank you.


    {
    "Request":
    {
    "Attribute1":"value",
    "payload":
    {
    "Attribute2_1":"value",
    "Attribute2_2":
    {
    "Attribute2_2_1":"value",
    "Attribute2_2_2":"value"
    },
    "Attribute3":"value"
    }
    }
    }

    Value in Payload variable on Process Model:

    [payload:[Attribute2_1:value, Attribute2_2:[Attribute2_2_1:value, Attribute2_2_2:value], Attribute3:value]]
Children