List<WorkItem> workItems = event.getWorkItemRep().findActivityWorkItems(event.getActivityInst().getActivityInstId());
for(WorkItem workItem : workItems) {
int state = StarFlowState.WORKITEM_RUNNING;
List<Participant> participants = event.getWorkItemRep().findWorkItemParticipants(workItem.getWorkItemId());
if(participants.size() == 1) {
Participant participant = participants.get(0);
if(Constants.PARTICIPANT_TYPE_PERSON.equals(participant.getParticType()))
state = StarFlowState.WORKITEM_RUNNING;
else
state = StarFlowState.WORKITEM_WAITING_RECEIVE;
} else
state = StarFlowState.WORKITEM_WAITING_RECEIVE;