idx
int64
0
41.2k
question
stringlengths
73
5.81k
target
stringlengths
5
918
10,100
public void continueIfExecutionDoesNotAffectNextOperation ( Callback < PvmExecutionImpl , Void > dispatching , Callback < PvmExecutionImpl , Void > continuation , PvmExecutionImpl execution ) { String lastActivityId = execution . getActivityId ( ) ; String lastActivityInstanceId = getActivityInstanceId ( execution ) ; ...
Executes the given depending operations with the given execution . The execution state will be checked with the help of the activity instance id and activity id of the execution before and after the dispatching callback call . If the id s are not changed the continuation callback is called .
10,101
protected void dispatchScopeEvents ( PvmExecutionImpl execution ) { PvmExecutionImpl scopeExecution = execution . isScope ( ) ? execution : execution . getParent ( ) ; List < DelayedVariableEvent > delayedEvents = new ArrayList < > ( scopeExecution . getDelayedEvents ( ) ) ; scopeExecution . clearDelayedEvents ( ) ; Ma...
Dispatches the current delayed variable events on the scope of the given execution .
10,102
protected void initActivityIds ( List < DelayedVariableEvent > delayedEvents , Map < PvmExecutionImpl , String > activityInstanceIds , Map < PvmExecutionImpl , String > activityIds ) { for ( DelayedVariableEvent event : delayedEvents ) { PvmExecutionImpl targetScope = event . getTargetScope ( ) ; String targetScopeActi...
Initializes the given maps with the target scopes and current activity id s and activity instance id s .
10,103
private boolean isOnDispatchableState ( PvmExecutionImpl targetScope ) { ActivityImpl targetActivity = targetScope . getActivity ( ) ; return targetScope . getActivityId ( ) == null || ! targetActivity . isScope ( ) || ( targetScope . isInState ( ActivityInstanceState . DEFAULT ) ) ; }
Checks if the given execution is on a dispatchable state . That means if the current activity is not a leaf in the activity tree OR it is a leaf but not a scope OR it is a leaf a scope and the execution is in state DEFAULT which means not in state Starting Execute or Ending . For this states it is prohibited to trigger...
10,104
private boolean isOnSameActivity ( String lastActivityInstanceId , String lastActivityId , String currentActivityInstanceId , String currentActivityId ) { return ( ( lastActivityInstanceId == null && lastActivityInstanceId == currentActivityInstanceId && lastActivityId . equals ( currentActivityId ) ) || ( lastActivity...
Compares the given activity instance id s and activity id s to check if the execution is on the same activity as before an operation was executed . The activity instance id s can be null on transitions . In this case the activity Id s have to be equal otherwise the execution changed .
10,105
private String getActivityInstanceId ( PvmExecutionImpl targetScope ) { if ( targetScope . isConcurrent ( ) ) { return targetScope . getActivityInstanceId ( ) ; } else { ActivityImpl targetActivity = targetScope . getActivity ( ) ; if ( ( targetActivity != null && targetActivity . getActivities ( ) . isEmpty ( ) ) ) { ...
Returns the activity instance id for the given execution .
10,106
public void resolveIncident ( final String incidentId ) { IncidentEntity incident = ( IncidentEntity ) Context . getCommandContext ( ) . getIncidentManager ( ) . findIncidentById ( incidentId ) ; IncidentHandler incidentHandler = findIncidentHandler ( incident . getIncidentType ( ) ) ; if ( incidentHandler == null ) { ...
Resolves an incident with given id .
10,107
protected < T extends HistoryEvent > T findInCache ( Class < T > type , String id ) { return Context . getCommandContext ( ) . getDbEntityManager ( ) . getCachedEntity ( type , id ) ; }
find a cached entity by primary key
10,108
public static PvmExecutionImpl getScopeExecution ( ScopeImpl scope , Map < ScopeImpl , PvmExecutionImpl > activityExecutionMapping ) { ScopeImpl flowScope = scope . getFlowScope ( ) ; return activityExecutionMapping . get ( flowScope ) ; }
In case the process instance was migrated from a previous version activities which are now parsed as scopes do not have scope executions . Use the flow scopes of these activities in order to find their execution . - For an event subprocess this is the scope execution of the scope in which the event subprocess is embede...
10,109
public static Map < ScopeImpl , PvmExecutionImpl > createActivityExecutionMapping ( List < PvmExecutionImpl > scopeExecutions , List < ScopeImpl > scopes ) { PvmExecutionImpl deepestExecution = scopeExecutions . get ( 0 ) ; if ( isLegacyAsyncAtMultiInstance ( deepestExecution ) ) { scopes . remove ( 0 ) ; } int numOfMi...
Creates an activity execution mapping when the scope hierarchy and the execution hierarchy are out of sync .
10,110
protected static boolean wasNoScope ( ActivityImpl activity , PvmExecutionImpl scopeExecutionCandidate ) { return wasNoScope72 ( activity ) || wasNoScope73 ( activity , scopeExecutionCandidate ) ; }
Determines whether the given scope was a scope in previous versions
10,111
protected static boolean isLegacyAsyncAtMultiInstance ( PvmExecutionImpl execution ) { ActivityImpl activity = execution . getActivity ( ) ; if ( activity != null ) { boolean isAsync = execution . getActivityInstanceId ( ) == null ; boolean isAtMultiInstance = activity . getParentFlowScopeActivity ( ) != null && activi...
This returns true only if the provided execution has reached its wait state in a legacy engine version because only in that case it can be async and waiting at the inner activity wrapped by the miBody . In versions > = 7 . 3 the execution would reference the multi - instance body instead .
10,112
public static PvmExecutionImpl determinePropagatingExecutionOnEnd ( PvmExecutionImpl propagatingExecution , Map < ScopeImpl , PvmExecutionImpl > activityExecutionMapping ) { if ( ! propagatingExecution . isScope ( ) ) { return propagatingExecution ; } else { if ( activityExecutionMapping . values ( ) . contains ( propa...
Tolerates the broken execution trees fixed with CAM - 3727 where there may be more ancestor scope executions than ancestor flow scopes ;
10,113
protected static boolean areEqualEventSubscriptions ( EventSubscriptionEntity subscription1 , EventSubscriptionEntity subscription2 ) { return valuesEqual ( subscription1 . getEventType ( ) , subscription2 . getEventType ( ) ) && valuesEqual ( subscription1 . getEventName ( ) , subscription2 . getEventName ( ) ) && val...
Checks if the parameters are the same apart from the execution id
10,114
public static void removeLegacyNonScopesFromMapping ( Map < ScopeImpl , PvmExecutionImpl > mapping ) { Map < PvmExecutionImpl , List < ScopeImpl > > scopesForExecutions = new HashMap < PvmExecutionImpl , List < ScopeImpl > > ( ) ; for ( Map . Entry < ScopeImpl , PvmExecutionImpl > mappingEntry : mapping . entrySet ( ) ...
Remove all entries for legacy non - scopes given that the assigned scope execution is also responsible for another scope
10,115
public static void migrateMultiInstanceJobDefinitions ( ProcessDefinitionEntity processDefinition , List < JobDefinitionEntity > jobDefinitions ) { for ( JobDefinitionEntity jobDefinition : jobDefinitions ) { String activityId = jobDefinition . getActivityId ( ) ; if ( activityId != null ) { ActivityImpl activity = pro...
When deploying an async job definition for an activity wrapped in an miBody set the activity id to the miBody except the wrapped activity is marked as async .
10,116
public static void repairMultiInstanceAsyncJob ( ExecutionEntity execution ) { ActivityImpl activity = execution . getActivity ( ) ; if ( ! isAsync ( activity ) && isActivityWrappedInMultiInstanceBody ( activity ) ) { execution . setActivity ( ( ActivityImpl ) activity . getFlowScope ( ) ) ; } }
When executing an async job for an activity wrapped in an miBody set the execution to the miBody except the wrapped activity is marked as async .
10,117
public static boolean isCompensationThrowing ( PvmExecutionImpl execution , Map < ScopeImpl , PvmExecutionImpl > activityExecutionMapping ) { if ( CompensationBehavior . isCompensationThrowing ( execution ) ) { ScopeImpl compensationThrowingActivity = execution . getActivity ( ) ; if ( compensationThrowingActivity . is...
Returns true if the given execution is in a compensation - throwing activity but there is no dedicated scope execution in the given mapping .
10,118
public void collectIds ( List < String > ids ) { ids . add ( attribute ( "id" ) ) ; for ( Element child : elements ) { child . collectIds ( ids ) ; } }
allows to recursively collect the ids of all elements in the tree .
10,119
public Iterator < FeatureDescriptor > getFeatureDescriptors ( final ELContext context , final Object base ) { return new Iterator < FeatureDescriptor > ( ) { Iterator < FeatureDescriptor > empty = Collections . < FeatureDescriptor > emptyList ( ) . iterator ( ) ; Iterator < ELResolver > resolvers = CompositeELResolver ...
Returns information about the set of variables or properties that can be resolved for the given base object . One use for this method is to assist tools in auto - completion . The results are collected from all component resolvers . The propertyResolved property of the ELContext is not relevant to this method . The res...
10,120
public static < T > boolean elementIsNotContainedInList ( T element , Collection < T > values ) { if ( element != null && values != null ) { return ! values . contains ( element ) ; } else { return false ; } }
Checks if the element is not contained within the list of values . If the element or the list are null then true is returned .
10,121
public static < T > boolean elementIsNotContainedInArray ( T element , T ... values ) { if ( element != null && values != null ) { return elementIsNotContainedInList ( element , Arrays . asList ( values ) ) ; } else { return false ; } }
Checks if the element is contained within the list of values . If the element or the list are null then true is returned .
10,122
public Class < ? > getType ( ELContext context ) throws ELException { return node . getType ( bindings , context ) ; }
Evaluates the expression as an lvalue and answers the result type .
10,123
public Object getValue ( ELContext context ) throws ELException { return node . getValue ( bindings , context , type ) ; }
Evaluates the expression as an rvalue and answers the result .
10,124
public void setValue ( ELContext context , Object value ) throws ELException { node . setValue ( bindings , context , value ) ; }
Evaluates the expression as an lvalue and assigns the given value .
10,125
public Set < MigratingProcessElementInstance > getChildren ( ) { Set < MigratingProcessElementInstance > childInstances = new HashSet < MigratingProcessElementInstance > ( ) ; childInstances . addAll ( childActivityInstances ) ; childInstances . addAll ( childTransitionInstances ) ; childInstances . addAll ( childCompe...
Returns a copy of all children modifying the returned set does not have any further effect .
10,126
public MethodInfo getMethodInfo ( ELContext context ) throws ELException { return node . getMethodInfo ( bindings , context , type , types ) ; }
Evaluates the expression and answers information about the method
10,127
public Object invoke ( ELContext context , Object [ ] paramValues ) throws ELException { return node . invoke ( bindings , context , type , types , paramValues ) ; }
Evaluates the expression and invokes the method .
10,128
private boolean containsIncompatibleResourceType ( ) { if ( queryByResourceType && queryByPermission ) { Resource [ ] resources = resourcesIntersection . toArray ( new Resource [ resourcesIntersection . size ( ) ] ) ; return ! ResourceTypeUtil . resourceIsContainedInArray ( resourceType , resources ) ; } return false ;...
check whether the permissions resources are compatible to the filtered resource parameter
10,129
public void updateModifiableFieldsFromEntity ( CaseDefinitionEntity updatingCaseDefinition ) { if ( this . key . equals ( updatingCaseDefinition . key ) && this . deploymentId . equals ( updatingCaseDefinition . deploymentId ) ) { this . revision = updatingCaseDefinition . revision ; this . historyTimeToLive = updating...
Updates all modifiable fields from another case definition entity .
10,130
public static boolean isWithinBatchWindow ( Date date , ProcessEngineConfigurationImpl configuration ) { if ( configuration . getBatchWindowManager ( ) . isBatchWindowConfigured ( configuration ) ) { BatchWindow batchWindow = configuration . getBatchWindowManager ( ) . getCurrentOrNextBatchWindow ( date , configuration...
Checks if given date is within a batch window . Batch window start time is checked inclusively .
10,131
public static List < EventSubscriptionEntity > collectCompensateEventSubscriptionsForScope ( ActivityExecution execution ) { final Map < ScopeImpl , PvmExecutionImpl > scopeExecutionMapping = execution . createActivityExecutionMapping ( ) ; ScopeImpl activity = ( ScopeImpl ) execution . getActivity ( ) ; final Set < Ev...
Collect all compensate event subscriptions for scope of given execution .
10,132
public static List < EventSubscriptionEntity > collectCompensateEventSubscriptionsForActivity ( ActivityExecution execution , String activityRef ) { final List < EventSubscriptionEntity > eventSubscriptions = collectCompensateEventSubscriptionsForScope ( execution ) ; final String subscriptionActivityId = getSubscripti...
Collect all compensate event subscriptions for activity on the scope of given execution .
10,133
private static String generateExceptionMessage ( String userId , List < MissingAuthorization > missingAuthorizations ) { StringBuilder sBuilder = new StringBuilder ( ) ; sBuilder . append ( "The user with id '" ) ; sBuilder . append ( userId ) ; sBuilder . append ( "' does not have one of the following permissions: " )...
Generate exception message from the missing authorizations .
10,134
private static String generateMissingAuthorizationMessage ( MissingAuthorization exceptionInfo ) { StringBuilder builder = new StringBuilder ( ) ; String permissionName = exceptionInfo . getViolatedPermissionName ( ) ; String resourceType = exceptionInfo . getResourceType ( ) ; String resourceId = exceptionInfo . getRe...
Generated exception message for the missing authorization .
10,135
public static ProcessEngine getProcessEngine ( String processEngineName , boolean forceCreate ) { if ( ! isInitialized ) { init ( forceCreate ) ; } return processEngines . get ( processEngineName ) ; }
obtain a process engine by name .
10,136
protected Number parseInteger ( String string ) throws ParseException { try { return Long . valueOf ( string ) ; } catch ( NumberFormatException e ) { fail ( INTEGER ) ; return null ; } }
Parse an integer literal .
10,137
protected Number parseFloat ( String string ) throws ParseException { try { return Double . valueOf ( string ) ; } catch ( NumberFormatException e ) { fail ( FLOAT ) ; return null ; } }
Parse a floating point literal .
10,138
protected final Token lookahead ( int index ) throws ScanException , ParseException { if ( lookahead . isEmpty ( ) ) { lookahead = new LinkedList < LookaheadToken > ( ) ; } while ( index >= lookahead . size ( ) ) { lookahead . add ( new LookaheadToken ( scanner . next ( ) , scanner . getPosition ( ) ) ) ; } return look...
get lookahead symbol .
10,139
private static ExpressionFactory newInstance ( Properties properties , String className , ClassLoader classLoader ) { Class < ? > clazz = null ; try { clazz = classLoader . loadClass ( className . trim ( ) ) ; if ( ! ExpressionFactory . class . isAssignableFrom ( clazz ) ) { throw new ELException ( "Invalid expression ...
Create an ExpressionFactory instance .
10,140
protected void parseImports ( ) { List < Element > imports = rootElement . elements ( "import" ) ; for ( Element theImport : imports ) { String importType = theImport . attribute ( "importType" ) ; XMLImporter importer = this . getImporter ( importType , theImport ) ; if ( importer == null ) { addError ( "Could not imp...
Parses the rootElement importing structures
10,141
public void parseMessages ( ) { for ( Element messageElement : rootElement . elements ( "message" ) ) { String id = messageElement . attribute ( "id" ) ; String messageName = messageElement . attribute ( "name" ) ; Expression messageExpression = null ; if ( messageName != null ) { messageExpression = expressionManager ...
Parses the messages of the given definitions file . Messages are not contained within a process element but they can be referenced from inner process elements .
10,142
protected void parseSignals ( ) { for ( Element signalElement : rootElement . elements ( "signal" ) ) { String id = signalElement . attribute ( "id" ) ; String signalName = signalElement . attribute ( "name" ) ; for ( SignalDefinition signalDefinition : signals . values ( ) ) { if ( signalDefinition . getName ( ) . equ...
Parses the signals of the given definitions file . Signals are not contained within a process element but they can be referenced from inner process elements .
10,143
public void parseProcessDefinitions ( ) { for ( Element processElement : rootElement . elements ( "process" ) ) { boolean isExecutable = ! deployment . isNew ( ) ; String isExecutableStr = processElement . attribute ( "isExecutable" ) ; if ( isExecutableStr != null ) { isExecutable = Boolean . parseBoolean ( isExecutab...
Parses all the process definitions defined within the definitions root element .
10,144
public void parseCollaboration ( ) { Element collaboration = rootElement . element ( "collaboration" ) ; if ( collaboration != null ) { for ( Element participant : collaboration . elements ( "participant" ) ) { String processRef = participant . attribute ( "processRef" ) ; if ( processRef != null ) { ProcessDefinitionI...
Parses the collaboration definition defined within the definitions root element and get all participants to lookup their process references during DI parsing .
10,145
protected void setActivityAsyncDelegates ( final ActivityImpl activity ) { activity . setDelegateAsyncAfterUpdate ( new ActivityImpl . AsyncAfterUpdate ( ) { public void updateAsyncAfter ( boolean asyncAfter , boolean exclusive ) { if ( asyncAfter ) { addMessageJobDeclaration ( new AsyncAfterMessageJobDeclaration ( ) ,...
Sets the delegates for the activity which will be called if the attribute asyncAfter or asyncBefore was changed .
10,146
protected void addMessageJobDeclaration ( MessageJobDeclaration messageJobDeclaration , ActivityImpl activity , boolean exclusive ) { ProcessDefinition procDef = ( ProcessDefinition ) activity . getProcessDefinition ( ) ; if ( ! exists ( messageJobDeclaration , procDef . getKey ( ) , activity . getActivityId ( ) ) ) { ...
Adds the new message job declaration to existing declarations . There will be executed an existing check before the adding is executed .
10,147
protected boolean exists ( MessageJobDeclaration msgJobdecl , String procDefKey , String activityId ) { boolean exist = false ; List < JobDeclaration < ? , ? > > declarations = jobDeclarations . get ( procDefKey ) ; if ( declarations != null ) { for ( int i = 0 ; i < declarations . size ( ) && ! exist ; i ++ ) { JobDec...
Checks whether the message declaration already exists .
10,148
protected void removeMessageJobDeclarationWithJobConfiguration ( ActivityImpl activity , String jobConfiguration ) { List < MessageJobDeclaration > messageJobDeclarations = ( List < MessageJobDeclaration > ) activity . getProperty ( PROPERTYNAME_MESSAGE_JOB_DECLARATION ) ; if ( messageJobDeclarations != null ) { Iterat...
Removes a job declaration which belongs to the given activity and has the given job configuration .
10,149
public ActivityImpl parseExclusiveGateway ( Element exclusiveGwElement , ScopeImpl scope ) { ActivityImpl activity = createActivityOnScope ( exclusiveGwElement , scope ) ; activity . setActivityBehavior ( new ExclusiveGatewayActivityBehavior ( ) ) ; parseAsynchronousContinuationForActivity ( exclusiveGwElement , activi...
Parses an exclusive gateway declaration .
10,150
public ActivityImpl parseInclusiveGateway ( Element inclusiveGwElement , ScopeImpl scope ) { ActivityImpl activity = createActivityOnScope ( inclusiveGwElement , scope ) ; activity . setActivityBehavior ( new InclusiveGatewayActivityBehavior ( ) ) ; parseAsynchronousContinuationForActivity ( inclusiveGwElement , activi...
Parses an inclusive gateway declaration .
10,151
public ActivityImpl parseParallelGateway ( Element parallelGwElement , ScopeImpl scope ) { ActivityImpl activity = createActivityOnScope ( parallelGwElement , scope ) ; activity . setActivityBehavior ( new ParallelGatewayActivityBehavior ( ) ) ; parseAsynchronousContinuationForActivity ( parallelGwElement , activity ) ...
Parses a parallel gateway declaration .
10,152
public ActivityImpl parseScriptTask ( Element scriptTaskElement , ScopeImpl scope ) { ActivityImpl activity = createActivityOnScope ( scriptTaskElement , scope ) ; ScriptTaskActivityBehavior activityBehavior = parseScriptTaskElement ( scriptTaskElement ) ; if ( activityBehavior != null ) { parseAsynchronousContinuation...
Parses a scriptTask declaration .
10,153
public ActivityImpl parseBusinessRuleTask ( Element businessRuleTaskElement , ScopeImpl scope ) { String decisionRef = businessRuleTaskElement . attributeNS ( CAMUNDA_BPMN_EXTENSIONS_NS , "decisionRef" ) ; if ( decisionRef != null ) { return parseDmnBusinessRuleTask ( businessRuleTaskElement , scope ) ; } else { return...
Parses a businessRuleTask declaration .
10,154
protected ActivityImpl parseDmnBusinessRuleTask ( Element businessRuleTaskElement , ScopeImpl scope ) { ActivityImpl activity = createActivityOnScope ( businessRuleTaskElement , scope ) ; activity . setScope ( true ) ; parseAsynchronousContinuationForActivity ( businessRuleTaskElement , activity ) ; String decisionRef ...
Parse a Business Rule Task which references a decision .
10,155
protected void parseAsynchronousContinuation ( Element element , ActivityImpl activity ) { boolean isAsyncBefore = isAsyncBefore ( element ) ; boolean isAsyncAfter = isAsyncAfter ( element ) ; boolean exclusive = isExclusive ( element ) ; activity . setAsyncBefore ( isAsyncBefore , exclusive ) ; activity . setAsyncAfte...
Parse async continuation of the given element and create async jobs for the activity .
10,156
public ActivityImpl parseSendTask ( Element sendTaskElement , ScopeImpl scope ) { if ( isServiceTaskLike ( sendTaskElement ) ) { return parseServiceTaskLike ( "sendTask" , sendTaskElement , scope ) ; } else { ActivityImpl activity = createActivityOnScope ( sendTaskElement , scope ) ; parseAsynchronousContinuationForAct...
Parses a sendTask declaration .
10,157
public ActivityImpl parseManualTask ( Element manualTaskElement , ScopeImpl scope ) { ActivityImpl activity = createActivityOnScope ( manualTaskElement , scope ) ; activity . setActivityBehavior ( new ManualTaskActivityBehavior ( ) ) ; parseAsynchronousContinuationForActivity ( manualTaskElement , activity ) ; parseExe...
Parses a manual task .
10,158
public ActivityImpl parseReceiveTask ( Element receiveTaskElement , ScopeImpl scope ) { ActivityImpl activity = createActivityOnScope ( receiveTaskElement , scope ) ; activity . setActivityBehavior ( new ReceiveTaskActivityBehavior ( ) ) ; parseAsynchronousContinuationForActivity ( receiveTaskElement , activity ) ; par...
Parses a receive task .
10,159
public ActivityImpl parseUserTask ( Element userTaskElement , ScopeImpl scope ) { ActivityImpl activity = createActivityOnScope ( userTaskElement , scope ) ; parseAsynchronousContinuationForActivity ( userTaskElement , activity ) ; TaskDefinition taskDefinition = parseTaskDefinition ( userTaskElement , activity . getId...
Parses a userTask declaration .
10,160
protected List < String > parseCommaSeparatedList ( String s ) { List < String > result = new ArrayList < String > ( ) ; if ( s != null && ! "" . equals ( s ) ) { StringCharacterIterator iterator = new StringCharacterIterator ( s ) ; char c = iterator . first ( ) ; StringBuilder strb = new StringBuilder ( ) ; boolean i...
Parses the given String as a list of comma separated entries where an entry can possibly be an expression that has comma s .
10,161
protected EventSubscriptionDeclaration parseSignalEventDefinition ( Element signalEventDefinitionElement , boolean isThrowing ) { String signalRef = signalEventDefinitionElement . attribute ( "signalRef" ) ; if ( signalRef == null ) { addError ( "signalEventDefinition does not have required property 'signalRef'" , sign...
Parses the Signal Event Definition XML including payload definition .
10,162
protected Escalation findEscalationForEscalationEventDefinition ( Element escalationEventDefinition ) { String escalationRef = escalationEventDefinition . attribute ( "escalationRef" ) ; if ( escalationRef == null ) { addError ( "escalationEventDefinition does not have required attribute 'escalationRef'" , escalationEv...
Find the referenced escalation of the given escalation event definition . Add errors if the referenced escalation not found .
10,163
public BoundaryConditionalEventActivityBehavior parseBoundaryConditionalEventDefinition ( Element element , boolean interrupting , ActivityImpl conditionalActivity ) { conditionalActivity . getProperties ( ) . set ( BpmnProperties . TYPE , ActivityTypes . BOUNDARY_CONDITIONAL ) ; ConditionalEventDefinition conditionalE...
Parses the given element as conditional boundary event .
10,164
public ConditionalEventDefinition parseIntermediateConditionalEventDefinition ( Element element , ActivityImpl conditionalActivity ) { conditionalActivity . getProperties ( ) . set ( BpmnProperties . TYPE , ActivityTypes . INTERMEDIATE_EVENT_CONDITIONAL ) ; ConditionalEventDefinition conditionalEventDefinition = parseC...
Parses the given element as intermediate conditional event .
10,165
public ConditionalEventDefinition parseConditionalStartEventForEventSubprocess ( Element element , ActivityImpl conditionalActivity , boolean interrupting ) { conditionalActivity . getProperties ( ) . set ( BpmnProperties . TYPE , ActivityTypes . START_EVENT_CONDITIONAL ) ; ConditionalEventDefinition conditionalEventDe...
Parses the given element as conditional start event of an event subprocess .
10,166
protected ConditionalEventDefinition parseConditionalEventDefinition ( Element element , ActivityImpl conditionalActivity ) { ConditionalEventDefinition conditionalEventDefinition = null ; Element conditionExprElement = element . element ( CONDITION ) ; if ( conditionExprElement != null ) { Condition condition = parseC...
Parses the given element and returns an ConditionalEventDefinition object .
10,167
public void parseProperty ( Element propertyElement , ActivityImpl activity ) { String id = propertyElement . attribute ( "id" ) ; String name = propertyElement . attribute ( "name" ) ; if ( name == null ) { if ( id == null ) { addError ( "Invalid property usage on line " + propertyElement . getLine ( ) + ": no id or n...
Parses one property definition .
10,168
public void parsePropertyCustomExtensions ( ActivityImpl activity , Element propertyElement , String propertyName , String propertyType ) { if ( propertyType == null ) { String type = propertyElement . attributeNS ( CAMUNDA_BPMN_EXTENSIONS_NS , TYPE ) ; propertyType = type != null ? type : "string" ; } VariableDeclarat...
Parses the custom extensions for properties .
10,169
public void parseSequenceFlowConditionExpression ( Element seqFlowElement , TransitionImpl seqFlow ) { Element conditionExprElement = seqFlowElement . element ( CONDITION_EXPRESSION ) ; if ( conditionExprElement != null ) { Condition condition = parseConditionExpression ( conditionExprElement ) ; seqFlow . setProperty ...
Parses a condition expression on a sequence flow .
10,170
public void parseExecutionListenersOnScope ( Element scopeElement , ScopeImpl scope ) { Element extentionsElement = scopeElement . element ( "extensionElements" ) ; if ( extentionsElement != null ) { List < Element > listenerElements = extentionsElement . elementsNS ( CAMUNDA_BPMN_EXTENSIONS_NS , "executionListener" ) ...
Parses all execution - listeners on a scope .
10,171
protected boolean isValidEventNameForScope ( String eventName , Element listenerElement ) { if ( eventName != null && eventName . trim ( ) . length ( ) > 0 ) { if ( "start" . equals ( eventName ) || "end" . equals ( eventName ) ) { return true ; } else { addError ( "Attribute 'event' must be one of {start|end}" , liste...
Check if the given event name is valid . If not an appropriate error is added .
10,172
public Object execute ( ExecutableScript script , VariableScope scope ) { ScriptEngine scriptEngine = scriptingEngines . getScriptEngineForLanguage ( script . getLanguage ( ) ) ; Bindings bindings = scriptingEngines . createBindings ( scriptEngine , scope ) ; return execute ( script , scope , bindings , scriptEngine ) ...
execute a given script in the environment
10,173
protected List < ExecutableScript > getEnvScripts ( String scriptLanguage ) { Map < String , List < ExecutableScript > > environment = getEnv ( scriptLanguage ) ; List < ExecutableScript > envScripts = environment . get ( scriptLanguage ) ; if ( envScripts == null ) { synchronized ( this ) { envScripts = environment . ...
Returns the env scripts for the given language . Performs lazy initialization of the env scripts .
10,174
protected List < ExecutableScript > initEnvForLanguage ( String language ) { List < ExecutableScript > scripts = new ArrayList < ExecutableScript > ( ) ; for ( ScriptEnvResolver resolver : envResolvers ) { String [ ] resolvedScripts = resolver . resolve ( language ) ; if ( resolvedScripts != null ) { for ( String resol...
Initializes the env scripts for a given language .
10,175
@ SuppressWarnings ( "unchecked" ) public < S > S getService ( ObjectName name ) { return ( S ) servicesByName . get ( name ) ; }
get a specific service by name or null if no such Service exists .
10,176
public static boolean isPartOfProcessApplication ( DeploymentUnit unit ) { if ( isProcessApplication ( unit ) ) { return true ; } if ( unit . getParent ( ) != null && unit . getParent ( ) != unit ) { return unit . getParent ( ) . hasAttachment ( PART_OF_MARKER ) ; } return false ; }
return true if the deployment unit is either itself a process application or part of a process application .
10,177
public Object getValue ( ELContext context , Object base , Object property ) { if ( context == null ) { throw new NullPointerException ( "context is null" ) ; } Object result = null ; if ( isResolvable ( base ) ) { int index = toIndex ( null , property ) ; List < ? > list = ( List < ? > ) base ; result = index < 0 || i...
If the base object is a list returns the value at the given index . The index is specified by the property argument and coerced into an integer . If the coercion could not be performed an IllegalArgumentException is thrown . If the index is out of bounds null is returned . If the base is a List the propertyResolved pro...
10,178
public static boolean executesNonScopeCompensationHandler ( PvmExecutionImpl execution ) { ActivityImpl activity = execution . getActivity ( ) ; return execution . isScope ( ) && activity != null && activity . isCompensationHandler ( ) && ! activity . isScope ( ) ; }
With compensation we have a dedicated scope execution for every handler even if the handler is not a scope activity ; this must be respected when invoking end listeners etc .
10,179
public static boolean executesDefaultCompensationHandler ( PvmExecutionImpl scopeExecution ) { ActivityImpl currentActivity = scopeExecution . getActivity ( ) ; if ( currentActivity != null ) { return scopeExecution . isScope ( ) && currentActivity . isScope ( ) && ! scopeExecution . getNonEventScopeExecutions ( ) . is...
Determines whether an execution is responsible for default compensation handling .
10,180
public DefaultDmnEngineConfiguration build ( ) { List < DmnDecisionEvaluationListener > decisionEvaluationListeners = createCustomPostDecisionEvaluationListeners ( ) ; dmnEngineConfiguration . setCustomPostDecisionEvaluationListeners ( decisionEvaluationListeners ) ; DmnTransformer dmnTransformer = dmnEngineConfigurati...
Modify the given DMN engine configuration and return it .
10,181
public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; if ( ! ProcessApplicationAttachments . isProcessApplication ( deploymentUnit ) ) { return ; } final Module module = deploymentUnit . getAttachment ...
this can happen ASAP in the POST_MODULE Phase
10,182
public ScriptEngine getScriptEngine ( String language , boolean resolveFromCache ) { ScriptEngine scriptEngine = null ; if ( resolveFromCache ) { scriptEngine = cachedEngines . get ( language ) ; if ( scriptEngine == null ) { scriptEngine = scriptEngineManager . getEngineByName ( language ) ; if ( scriptEngine != null ...
Returns a cached script engine or creates a new script engine if no such engine is currently cached .
10,183
protected boolean isCachable ( ScriptEngine scriptEngine ) { Object threadingParameter = scriptEngine . getFactory ( ) . getParameter ( "THREADING" ) ; return threadingParameter != null ; }
Allows checking whether the script engine can be cached .
10,184
public static TaskEntity createAndInsert ( VariableScope execution ) { TaskEntity task = create ( ) ; if ( execution instanceof ExecutionEntity ) { ExecutionEntity executionEntity = ( ExecutionEntity ) execution ; task . setExecution ( executionEntity ) ; task . skipCustomListeners = executionEntity . isSkipCustomListe...
creates and initializes a new persistent task .
10,185
protected void propertyChanged ( String propertyName , Object orgValue , Object newValue ) { if ( propertyChanges . containsKey ( propertyName ) ) { Object oldOrgValue = propertyChanges . get ( propertyName ) . getOrgValue ( ) ; if ( ( oldOrgValue == null && newValue == null ) || ( oldOrgValue != null && oldOrgValue . ...
Tracks a property change . Therefore the original and new value are stored in a map . It tracks multiple changes and if a property finally is changed back to the original value then the change is removed .
10,186
public void setDelegationStateString ( String delegationState ) { if ( delegationState == null ) { setDelegationStateWithoutCascade ( null ) ; } else { setDelegationStateWithoutCascade ( DelegationState . valueOf ( delegationState ) ) ; } }
Setter for mybatis mapper .
10,187
public static < T > List < T > asArrayList ( T [ ] values ) { ArrayList < T > result = new ArrayList < T > ( ) ; Collections . addAll ( result , values ) ; return result ; }
Arrays . asList cannot be reliably used for SQL parameters on MyBatis < 3 . 3 . 0
10,188
public static < T > List < List < T > > partition ( List < T > list , final int partitionSize ) { List < List < T > > parts = new ArrayList < List < T > > ( ) ; final int listSize = list . size ( ) ; for ( int i = 0 ; i < listSize ; i += partitionSize ) { parts . add ( new ArrayList < T > ( list . subList ( i , Math . ...
Chops a list into non - view sublists of length partitionSize .
10,189
public static Date offset ( Long offsetInMillis ) { DateTimeUtils . setCurrentMillisOffset ( offsetInMillis ) ; return new Date ( DateTimeUtils . currentTimeMillis ( ) ) ; }
Moves the clock by the given offset and keeps it running from that point on .
10,190
protected void updateAuthorizationBasedOnCacheEntries ( AuthorizationEntity authorization , String userId , String groupId , Resource resource , String resourceId ) { DbEntityManager dbManager = Context . getCommandContext ( ) . getDbEntityManager ( ) ; List < AuthorizationEntity > list = dbManager . getCachedEntitiesB...
Searches through the cache if there is already an authorization with same rights . If that s the case update the given authorization with the permissions and remove the old one from the cache .
10,191
protected void insertOrUpdate ( HistoryEvent historyEvent ) { final DbEntityManager dbEntityManager = getDbEntityManager ( ) ; if ( isInitialEvent ( historyEvent ) ) { dbEntityManager . insert ( historyEvent ) ; } else { if ( dbEntityManager . getCachedEntity ( historyEvent . getClass ( ) , historyEvent . getId ( ) ) =...
general history event insert behavior
10,192
protected void insertHistoricVariableUpdateEntity ( HistoricVariableUpdateEventEntity historyEvent ) { DbEntityManager dbEntityManager = getDbEntityManager ( ) ; if ( shouldWriteHistoricDetail ( historyEvent ) ) { byte [ ] byteValue = historyEvent . getByteValue ( ) ; if ( byteValue != null ) { ByteArrayEntity byteArra...
customized insert behavior for HistoricVariableUpdateEventEntity
10,193
protected Token nextEval ( ) throws ScanException { char c1 = input . charAt ( position ) ; char c2 = position < input . length ( ) - 1 ? input . charAt ( position + 1 ) : ( char ) 0 ; switch ( c1 ) { case '*' : return fixed ( Symbol . MUL ) ; case '/' : return fixed ( Symbol . DIV ) ; case '%' : return fixed ( Symbol ...
token inside an eval expression
10,194
public static void main ( String [ ] args ) { if ( args . length != 1 ) { System . err . println ( "usage: java " + Builder . class . getName ( ) + " <expression string>" ) ; System . exit ( 1 ) ; } PrintWriter out = new PrintWriter ( System . out ) ; Tree tree = null ; try { tree = new Builder ( Feature . METHOD_INVOC...
Dump out abstract syntax tree for a given expression
10,195
private void checkConfiguration ( JobExecutorXml jobExecutorXml ) { Map < String , String > properties = jobExecutorXml . getProperties ( ) ; for ( Entry < String , String > entry : properties . entrySet ( ) ) { LOGGER . warning ( "Property " + entry . getKey ( ) + " with value " + entry . getValue ( ) + " from bpm-pla...
Checks the validation to see if properties are present which will be ignored in this environment so we can log a warning .
10,196
private void stopProcessEngine ( String serviceName , PlatformServiceContainer serviceContainer ) { try { serviceContainer . stopService ( serviceName ) ; } catch ( Exception e ) { LOG . exceptionWhileStopping ( "Process Engine" , serviceName , e ) ; } }
Stops a process engine failures are logged but no exceptions are thrown .
10,197
public static DelegateExecution getCurrentDelegationExecution ( ) { BpmnExecutionContext bpmnExecutionContext = Context . getBpmnExecutionContext ( ) ; ExecutionEntity executionEntity = null ; if ( bpmnExecutionContext != null ) { executionEntity = bpmnExecutionContext . getExecution ( ) ; } return executionEntity ; }
Returns the current delegation execution or null if the execution is not available .
10,198
public void addStep ( DeploymentOperationStep step ) { if ( currentStep != null ) { steps . add ( steps . indexOf ( currentStep ) + 1 , step ) ; } else { steps . add ( step ) ; } }
Add a new atomic step to the composite operation . If the operation is currently executing a step the step is added after the current step .
10,199
public EventSubscriptionEntity createSubscriptionForExecution ( ExecutionEntity execution ) { EventSubscriptionEntity eventSubscriptionEntity = new EventSubscriptionEntity ( execution , eventType ) ; String eventName = resolveExpressionOfEventName ( execution ) ; eventSubscriptionEntity . setEventName ( eventName ) ; i...
Creates and inserts a subscription entity depending on the message type of this declaration .