protected void addMessageJobDeclaration ( MessageJobDeclaration messageJobDeclaration , ActivityImpl activity , boolean exclusive ) { ProcessDefinition procDef = ( ProcessDefinition ) activity . getProcessDefinition ( ) ; if ( ! exists ( messageJobDeclaration , procDef . getKey ( ) , activity . getActivityId ( ) ) ) { messageJobDeclaration . setExclusive ( exclusive ) ; messageJobDeclaration . setActivity ( activity ) ; messageJobDeclaration . setJobPriorityProvider ( ( ParameterValueProvider ) activity . getProperty ( PROPERTYNAME_JOB_PRIORITY ) ) ; addMessageJobDeclarationToActivity ( messageJobDeclaration , activity ) ; addJobDeclarationToProcessDefinition ( messageJobDeclaration , procDef ) ; } }
Adds the new message job declaration to existing declarations . There will be executed an existing check before the adding is executed .