To test workflow task individual

I have an activity diagram like below. I am trying to write integration test for it. Wanted to test only one functionality(task) at a time.

So here for instance: I wanted to check KYC Field Mapping without invoking “Create Casa Account” task. Is that possible?

Note:

I am looking for ways to mark in camunda table some how “create casa account task” is completed before starting KYC Field Mapping task.

Hi @Minisha_M,

yes, it is: Process Instance Modification | docs.camunda.org.

This is not included. Why do need it?

Hope this helps, Ingo

Ingo_Richtsmeier Okay thank you. Is there an rest api available to do this?

ProcessInstance processInstance = runtimeService.createProcessInstanceByKey("Loan_Application")
  .startBeforeActivity("application_OK")
  .setVariable("approved", true)
  .execute();

Oh seems its the same api as starting process instance with additional variables lemme check.
https://docs.camunda.org/manual/7.15/reference/rest/process-definition/post-start-process-instance/

I get the below exception, when starting the activity in between. Any pointers to resolve this?
Request
http://localhost:8080/engine-rest/process-definition/key/BPMNId/start
{
“businessKey”: “MI21052904761111”,
“startInstructions”: {
“type”: “startBeforeActivity”,
“activityId”: “feeWaiverActivityId”,
“variables”: {}
},
“variables”: {}
}

Response:
{
“type”: “InvalidRequestException”,
“message”: “”
}