public ActivityImpl parseReceiveTask ( Element receiveTaskElement , ScopeImpl scope ) { ActivityImpl activity = createActivityOnScope ( receiveTaskElement , scope ) ; activity . setActivityBehavior ( new ReceiveTaskActivityBehavior ( ) ) ; parseAsynchronousContinuationForActivity ( receiveTaskElement , activity ) ; parseExecutionListenersOnScope ( receiveTaskElement , activity ) ; if ( receiveTaskElement . attribute ( "messageRef" ) != null ) { activity . setScope ( true ) ; activity . setEventScope ( activity ) ; EventSubscriptionDeclaration declaration = parseMessageEventDefinition ( receiveTaskElement ) ; declaration . setActivityId ( activity . getActivityId ( ) ) ; declaration . setEventScopeActivityId ( activity . getActivityId ( ) ) ; addEventSubscriptionDeclaration ( declaration , activity , receiveTaskElement ) ; } for ( BpmnParseListener parseListener : parseListeners ) { parseListener . parseReceiveTask ( receiveTaskElement , scope , activity ) ; } return activity ; }
Parses a receive task .