Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.
Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
#828689
Hey everyone, I'd appreciate any help you might be able to offer with this issue:

I'm currently using the Get Project Definition endpoint (https://wiki.processmaker.com/3.0/REST_API_Designer#Get_project_definition) and I get "activities" returned where the act_type is "SUB_PROCESS". Unfortunately, it does not appear that the activity object returned contains any information I can use to determine the project id or starting task of the relevant subprocess (https://wiki.processmaker.com/3.2/Sub-Processes#Configuring_a_Sub-process.27s_Properties).

For reference, here's an example activity object returned from the Get Project Definition endpoint:
Code: Select all
{ 
  act_uid: '8870204105b27ac2d502ac8094008862',
  act_name: 'Opportunity Follow-up',
  act_type: 'SUB_PROCESS',
  act_is_for_compensation: '0',
  act_start_quantity: '1',
  act_completion_quantity: '0',
  act_task_type: 'COLLAPSED',
  act_implementation: '',
  act_instantiate: '0',
  act_script_type: '',
  act_script: '',
  act_loop_type: 'EMPTY',
  act_test_before: '0',
  act_loop_maximum: '0',
  act_loop_condition: '0',
  act_loop_cardinality: '0',
  act_loop_behavior: '0',
  act_is_adhoc: '0',
  act_is_collapsed: '0',
  act_completion_condition: '0',
  act_ordering: '0',
  act_cancel_remaining_instances: '0',
  act_protocol: '0',
  act_method: '0',
  act_is_global: '0',
  act_referer: '0',
  act_default_flow: '0',
  act_master_diagram: '0',
  bou_element: '7809281575fbd2113434014015735470',
  bou_x: '692',
  bou_y: '125',
  bou_width: '150',
  bou_height: '75',
  bou_container: 'bpmnDiagram'
 }
Additionally, I have attempted to use the Get Activity endpoint (https://wiki.processmaker.com/3.0/REST_API_Designer#Get_Activity) and, while that returned some different information, unfortunately still did not return the process/project id of the connected project, or its starting task:
Code: Select all
{
    "definition": [],
    "properties": {
        "tas_title": "Opportunity Follow-up",
        "tas_description": "",
        "tas_def_title": "",
        "tas_def_subject_message": "",
        "tas_def_message": "",
        "tas_def_description": "",
        "tas_type": "SUBPROCESS",
        "tas_duration": 1,
        "tas_type_day": "",
        "tas_timeunit": "DAYS",
        "tas_priority_variable": "",
        "tas_assign_type": "BALANCED",
        "tas_assign_variable": "@@SYS_NEXT_USER_TO_BE_ASSIGNED",
        "tas_group_variable": "",
        "tas_transfer_fly": "FALSE",
        "tas_send_last_email": "FALSE",
        "tas_derivation_screen_tpl": "",
        "tas_selfservice_timeout": 0,
        "tas_selfservice_time": 0,
        "tas_selfservice_time_unit": "",
        "tas_selfservice_trigger_uid": "",
        "tas_selfservice_execution": "EVERY_TIME",
        "tas_not_email_from_format": 0,
        "tas_average": null,
        "tas_sdv": null,
        "tas_calendar": "",
        "tas_def_message_type": "text",
        "tas_def_message_template": "alert_message.html"
    }
}
... and I have attempted the Get Steps for Task endpoint (https://wiki.processmaker.com/3.0/REST_API_Designer#Get_Steps_for_Activity:_.3C.2Fcode.3EGET_.2Fproject.2F.7Bprj_uid.7D.2Factivity.2F.7Bact_uid.7D.2Fsteps) but it returns an empty array for the subprocess activity.

Anyway, I hope I'm just overlooking something. I need to see which subprocess definition that particular activity will route to (and ideally the starting task) so I can then also grab that subprocess' project definition.

If there isn't an endpoint to retrieve this information yet, if you could point me to the database location of the information I'd really appreciate it.

Thanks!
Want to create your own meme coin?

In the world of cryptocurrencies, a unique and exc[…]

The market for cryptocurrencies is demonstrating a[…]

What's SAP FICO?

Embarking on a dissertation can be one of the most[…]

Hello. For rental housing, there are software solu[…]