Hi Nishant
maintain the terminating event at the header of the sub-workflow.
SWDD->Click the HAT icon->tab version Dependent -> Events -> Give the BO, Event name set receiver Type - Cancel Workflow.
trigger this event from the main WF based on your conditions (use the event creator step). Ensure that the BO which you use has the same instance in the main WF and also ALL the instances of the sub workflow.
if you do not want to "cancel" , but "complete" the sub-WF, then in the Sub WF, crate a Fork - 1 of 2. Entire processing should be in one branch and the other branch should first have a "Wait for Event Step" and the second step should be a "process Control" with "Complete WF".
trigger the above event from the main WF. Here too, ensure both the main WF and the sub Workflows have same BO instance which you will trigger (in main WF) and Listen / Wait in the sub WF.
regards,
Modak