Subprocess not triggering when parent process condition is met

david_api
Mon, 31 Mar 2025 09:27:45 +0000

I can provide a comprehensive solution addressing all three aspects of your subprocess triggering issue:

Subprocess Trigger Conditions: The core problem is likely a mismatch between how the parent process passes parameters and how the subprocess expects to receive them. In Creatio 8.1, subprocess trigger conditions require exact parameter type and name matching. Here’s what to verify:

1. Open your subprocess in the Process Designer and check the ‘Parameters’ section. Ensure OrderId and OrderTotal are defined as input parameters (not process variables)

2. Verify the parameter data types exactly match what the parent sends (e.g., OrderId as Guid, OrderTotal as Decimal)

3. Check if any parameters are marked as ‘Required’ - if so, they must have non-null values from the parent

4. Look for any ‘Start Conditions’ configured on the subprocess start event - these are additional filters that must evaluate to true for the subprocess to begin

To fix: Remove any start conditions temporarily and ensure all input parameters are marked as optional initially. Test if the subprocess triggers. Then add back conditions one at a time to identify which is blocking execution.

Parent-Child Process Linkage: The ‘Completed’ status on the subprocess element without an actual subprocess instance indicates the parent process thinks it successfully called the subprocess, but the subprocess never initialized. This happens when:

1. The ‘Execute Subprocess’ element is configured to run asynchronously without waiting for completion. In this mode, the parent marks the element complete immediately after sending the trigger, regardless of whether the subprocess actually starts.

2. The subprocess reference is incorrect or points to an outdated version. After publishing a subprocess, you must refresh the parent process designer to see the latest version. Re-add the subprocess element to ensure it references the current published version.

3. Parameter mapping uses process variables that haven’t been initialized yet. Even if you added logging that shows values, timing matters - ensure the variables are populated before the subprocess call, not in parallel activities.

Solution: Change the subprocess element to ‘Synchronous’ execution mode temporarily. This forces the parent to wait for the subprocess to start and complete, which will surface any errors. Check the parent process log again - you should now see error details if the subprocess fails to initialize.

Process Log Review: The process log in Creatio 8.1 has multiple detail levels that aren’t visible by default. Enable comprehensive logging:

1. Navigate to System Settings and set ‘UseProcessLogLevel’ to ‘Trace’

2. Set ‘LogProcessElementExecution’ to true

3. Enable ‘LogProcessParameters’ to see actual parameter values passed between processes

4. Restart the application pool for settings to take effect

After enabling trace logging, trigger your parent process again and review the log. You should see:

Parameter values at each step of the parent process

The exact moment the subprocess call is made

Any validation errors from the subprocess initialization

If the subprocess start event receives the parameters correctly

Look specifically for entries like ‘Subprocess [Name] initialization failed’ or ‘Parameter validation error’ - these will reveal the exact cause.

Additional troubleshooting steps:

1. Test the subprocess independently by creating a simple test parent process that only calls the subprocess with hardcoded parameter values. If this works, the issue is in your main parent process’s parameter preparation.

2. Check the subprocess’s ‘Run As’ configuration. If it’s set to run as a specific user and that user doesn’t have permissions for the entities the subprocess accesses, initialization will fail silently.

3. Verify there are no circular dependencies - if your subprocess somehow references or waits for the parent process, it can cause initialization deadlock.

4. Review the database directly: Query the SysProcessLog table for records where ParentProcessId matches your parent process instance. If no child records exist, the subprocess truly isn’t starting. If child records exist with Status=‘Error’, read the ErrorMessage column for details.

For immediate resolution, implement this workaround:

Replace the ‘Execute Subprocess’ element with a ‘Script Task’ element

Use code to manually instantiate the subprocess: var subprocess = new ProcessSchema(UserConnection, “YourSubprocessName”);

subprocess.SetPropertyValue(“OrderId”, orderIdValue);

subprocess.SetPropertyValue(“OrderTotal”, orderTotalValue);

subprocess.Execute();

This gives you more control and better error messages if initialization fails. Once you identify the root cause using this approach, you can revert to using the standard subprocess element with corrected configuration.