3

We are building a custom activity and having issues with using the outArguments where the activity is working 100% and the values are also being correctly processed by the decision split (just did a simple "JobListId" is not null).

The issue is that when you save/activate and reload the page the decision split appears as not configured (greyed out). When creating a new version i can configure the decision split again and without making any changes it saves correctly so the outArgument is clearly there (but when saving/activating the same as above happens). second point which may help is that Salesforce Activities cannot see the outArguments at all which makes me wonder if im missing something.

The config.json below:

{
  "workflowApiVersion": "1.1",
  "metaData": {
    "version": "2.0",
    "icon": "images/open.png",
    "iconSmall": "images/openSmall.png"
  },
  "type": "REST",
  "lang": {
    "en-US": {
      "name": "Task",
      "description": "Activity for define Contact Information "
    }
  },
  "arguments": {
    "execute": {
      "inArguments": [
        {
          "InContactKey": "{{Contact.Key}}"
        }
      ],
      "outArguments": [
        {
          "JobListId": "text"
        },
        {
          "JobDefintionListId": "text"
        }
      ],
      "url": "https://MYAPP.herokuapp.com/ixn/activities/create-case/execute/",
      "verb": "POST",
      "body": "",
      "header": "",
      "format": "json",
      "useJwt": false,
      "timeout": 10000
    }
  },
  "configurationArguments": {
    "applicationExtensionKey": "HerokuActivity",
    "defaults": {},
    "save": {
      "url": "https://MYAPP.herokuapp.com/ixn/activities/create-case/save/",
      "body": "",
      "verb": "POST",
      "useJwt": false
    },
    "publish": {
      "url": "https://MYAPP.herokuapp.com/ixn/activities/create-case/publish/",
      "verb": "POST",
      "body": "",
      "useJwt": false
    },
    "validate": {
      "url": "https://MYAPP.herokuapp.com/ixn/activities/create-case/validate/",
      "verb": "POST",
      "body": "",
      "useJwt": false
    }
  },
  "edit": {
    "url": "https://MYAPP.herokuapp.com/ixn/activities/create-case/",
    "height": 500,
    "width": 800
  },
  "wizardSteps": [
    {
      "label": "Template",
      "key": "step1"
    },
    {
      "label": "Details",
      "key": "step2"
    },
    {
      "label": "Confirm",
      "key": "step3"
    }
  ],
  "schema": {
    "arguments": {
      "execute": {
        "inArguments": [
          {
            "InContactKey": {
              "dataType": "Text",
              "isNullable": false,
              "direction": "in"
            }
          }
        ],
        "outArguments": [
          {
            "JobListId": {
              "dataType": "Text",
              "isNullable": false,
              "direction": "Out",
              "access": "Visible"
            },
            "JobDefintionListId": {
              "dataType": "Text",
              "isNullable": false,
              "direction": "Out",
              "access": "Visible"
            }
          }
        ]
      }
    }
  }
}
3
  • Regarding your second point "Salesforce Activities cannot see the outArguments at all", Out Arguments from Custom Activities can only be used by other Custom Activities, not by Standard Activities. You would have thought that you can use Data Binding (in the Interaction Context) to use Out Arguments from a Custom Activity in a Standard Activity, but this does not appear to be the case. Commented Aug 13, 2017 at 23:58
  • the UpdateActivity is certainly called function save() { console.log(ActivityConfig); ActivityConfig.TemplateId = $("#finalTemplate").data("TemplateId"); console.log(ActivityConfig); Object.assign(toJbPayload.arguments.execute.inArguments[0], ActivityConfig); toJbPayload.metaData.isConfigured = true; console.log(toJbPayload); //return to Activity connection.trigger('updateActivity', toJbPayload); }; Also, the outArguments are appearing in the Journey Metadata when accessing it via API.
    – Doug
    Commented Aug 14, 2017 at 8:58
  • Correct, the values are being set on Execute, so they are on the server not client side. In the JSON above, you can see the schema already contains the required outArguments so no need to actively add them to "toJbPayload". or...am I missing something?
    – Doug
    Commented Aug 14, 2017 at 13:18

0

You must log in to answer this question.