Click or drag to resize

MainCompleteActivity Method

The codemethod is intended to be used in request processes, where the flow is routed back to the requesting user at some point for some kind of confirmation. However, if the requesting user doesn't complete their activity within a certain time frame, the flow should continue automatically: the codemethod handles this scenario. The codemethod reassigns a certain activity instance to the identity user (typically the system user) and completes/activates a certain outgoing transition. and completes/activates a certain outgoing transition.

Action object must be an activity instance.

The activity must be active. The activity must have an outgoing transition with the specified transitionIndex. The transitions are ordered alphabetically by their English name.

The method routes the process by activating the transition and it does this by reassigning the activity to the identity user.

To use this code method, you can do the following (as an example):

- Create a system timer event

- Event must trigger on activities

- The event filter should filter on a specific process template

- The state filter should be "Active"

- A filter expression should state that: active time <= x days

Codemethod usage
Designed to be used in a process only (Yes/No)Yes
Action Object (data object type)Activity

Namespace:  Omada.OE.UtilityCodeAssembly
Assembly:  Omada.OE.UtilityCodeAssembly (in Omada.OE.UtilityCodeAssembly.dll) Version: 15.0.0.0
Syntax
C#
public bool CompleteActivity(
	CodeMethodInvokeContext context,
	int transitionIndex
)

Parameters

context
Type: Omada.OE.ModelCodeMethodInvokeContext
An invoke context object.
transitionIndex
Type: SystemInt32
transition index that should be activated after the activity is completed.

Return Value

Type: Boolean
See Also