0

I am new to working with process maker and I cannot figure out how to get the form for the current task in a process using the GET /cases/{app_uid}/current-task. I am able to create new cases using POST /cases, which go in the draft. I am also able to route those cases and put them in inbox using the /cases/{{app_uid}}/route-case. I can also figure out the variables using the process-variables API endpoint. But I cannot tell which variable is needed by the current task and how to get the options for it.

Is someone aware of this? How to get the dynaform for the current task?

Rohan
  • 13,308
  • 21
  • 81
  • 154

2 Answers2

1

You can use the Designer REST API to find the steps that are part of a given task. In particular, you might be interested in the /steps endpoint. Once you know the steps of a given task (including any dynaforms), you can get the information of the corresponding dynaform with the /dynaforms endpoint, which includes the definition of all Dynaform fields.

1

You can achieve this through the following steps:

  1. First get the task UID and then call the REST Endpoint /api/1.0/{workspace}/project/{project UID}/activity/{Task UID}/steps to get all the steps for that task.
  2. Iterate through the steps to get the UID of the first dynaform which is stored in step_uid_obj.
  3. To access the Dynaform call the REST Endpoint /api/1.0/{workspace}/project/{project UID}/dynaform/{dynaform UID}. It returns a json object for the dynaform which stores all the properties of the dynaform and the fields.

In order to access the variables you can call the following REST Endpoint, which returns all the variables for that project. /api/1.0/{workspace}/cases/{application UID}/variables

Zainab
  • 21
  • 2