web service
web api
RESTful
webservice restful external integration
json
script task
parameter
7.12
service_enterprise

Hello community



I am working with a business process using the process element [Call Web Service].

The web service configuration and the call are working correctly.

The JSON response is similar to:

{

"$ totalResults": 2,

"$ startIndex": 1,

"$ itemsPerPage": 100,

"$ resources": [

     {

      "$ clave": "t6UJ9A000001",

      "$ Static_state": 200,

      "$ etag": "Yi4EmiUg3xw =",

       "Account": {

             "$ clave": "A6UJ9A0001RU",

             "$ uuid": "00000000-0000-0000-0000-000000000000",

           }

      },

      {

      "$ clave": "t6UJ9A00000B",

      "$ Static_state": 200,

"$ etag": "wMpPUtrfgdA =",

"Account": {

"$ clave": "A6UJ9A0001RX",

"$ uuid": "00000000-0000-0000-0000-000000000000",

}

}

]

}



My goal is to iterate the JSON and finally create tickets in BPM with the source information.

Using a pre-configured page I was able to determine that the parameter where the information is returned is [#WS Step.Response body #]

How can I take this value in a Script Task and process the JSON? or what is the correct procedure to do this?

Previously I should be able to take the value of the parameter [#WS Setp.Success #] to determine if the execution was successful

Thank you!

Good weekend

Like 0

Like

1 comments

get/set a parameter value in a business process script task

var parameter1 = Get<Guid>("Parameter1");

Set("Parameter2", parameter1.ToString());

var parameter2 = Get<string>("Parameter2");

get object of type UserConnection

var userConnection = Get<UserConnection>("UserConnection");

Show all comments

Hi everyone, 

When I try to use the change event to bindTo a function, I get the following error : "Uncaught TypeError: Cannot read property 'changeMethod' of undefined".

In my diff schema, the change event has a bound function: 

{
    "operation": "insert",
    "name": "Product",
    "values": {
        "layout": {
            "colSpan": 12,
            "rowSpan": 1,
            "column": 0,
            "row": 1,
            "layoutName": "MyLayout"
        },
        "bindTo": "MyLookup",
        "contentType": Terrasoft.ContentType.LOOKUP,
        "enabled": true,
        "change": {
            bindTo: "setProduct"
        },
        "contentType": 3
    },
    "parentName": "MyLayout",
    "propertyName": "items",
    "index": 1
}

And I call it's method handler with the following. 

setProduct: function() {
    console.log("Success!");
}

Adding the "change": { bindTo: "setProduct" } causes the page to not load. Is there a way to activate a JavaScript function when a select element on a page is changed? I need to change the values in a corresponding select element based on the value of the preceding select element.

Like 0

Like

1 comments

Hi,

In order to overcome such issue, please, check that you have binded to an existing lookup "MyLookup". Also, you can try another change method approach. 

In the onEntityInitialized function do the following:

onEntityInitialized: function(){
  this.callParent(arguments);
  this.on("change:Product", this.setProduct, this);
}

Hope this helps.

Regards,

Anastasia

Show all comments
oData
json

I was wondering where I can find the JSON format or record layout for an odata record in Json format; creating a contact record for example.  Can the odata service describe the format?

Thanks 

Like 0

Like

2 comments

It seems the basic format is simple, I jump the gun

  { 

                'Name': 'Test User',

                'Dear': 'TU',

                'Email': 'Tester@TestsMarketNetServices.com',

                'Phone': '6168477992',

                'Notes': 'Testing 123' 

    }

Additional question: Can you nest relationships with the same document, like activities or do they have to be created separately?

John Adkins,

Yes, you have to create them separately. There is not way to nest relationships.

Regards,

Anastasia

Show all comments

Can someone tell me where to find the response codes or error description for landing page posts.

I'm getting  {"SaveWebFormObjectDataResult":"{resultMessage:\"Not allowed request URL.\"",resultCode:-1}""}

File attachments

Like

3 comments

Dear John,

 

The interpretation of the error codes depends on your landing page settings. The message implies that it is the error of the framework you are using and not the HTTP POST code. 

 

Best regards,

Lisa

 

Thanks for your reply ...

This message is differently coming from the post response.  The url returning the response is our BPM site.  I have postman in the middle. 

My question to the community, "is there a list of standard responses or error codes available for form postings?".  I'm sure I'm doing something silly, just wondering what documentation was available.

Thanks again.

 

 

 

I figured out my error - it was silly.

The landing page domain name didn't match the posting url specified in the landing page setup.  It has to be the complete url name, not just the domain name.

 

Show all comments