protected void removeMessageJobDeclarationWithJobConfiguration ( ActivityImpl activity , String jobConfiguration ) { List < MessageJobDeclaration > messageJobDeclarations = ( List < MessageJobDeclaration > ) activity . getProperty ( PROPERTYNAME_MESSAGE_JOB_DECLARATION ) ; if ( messageJobDeclarations != null ) { Iterator < MessageJobDeclaration > iter = messageJobDeclarations . iterator ( ) ; while ( iter . hasNext ( ) ) { MessageJobDeclaration msgDecl = iter . next ( ) ; if ( msgDecl . getJobConfiguration ( ) . equalsIgnoreCase ( jobConfiguration ) && msgDecl . getActivityId ( ) . equalsIgnoreCase ( activity . getActivityId ( ) ) ) { iter . remove ( ) ; } } } ProcessDefinition procDef = ( ProcessDefinition ) activity . getProcessDefinition ( ) ; List < JobDeclaration < ? , ? > > declarations = jobDeclarations . get ( procDef . getKey ( ) ) ; if ( declarations != null ) { Iterator < JobDeclaration < ? , ? > > iter = declarations . iterator ( ) ; while ( iter . hasNext ( ) ) { JobDeclaration < ? , ? > jobDcl = iter . next ( ) ; if ( jobDcl . getJobConfiguration ( ) . equalsIgnoreCase ( jobConfiguration ) && jobDcl . getActivityId ( ) . equalsIgnoreCase ( activity . getActivityId ( ) ) ) { iter . remove ( ) ; } } } }
Removes a job declaration which belongs to the given activity and has the given job configuration .