Source:
private PropertyWriter userTask(Node<View<BaseUserTask>, ?> n) { org.eclipse.bpmn2.UserTask task = bpmn2.createUserTask(); task.setId(n.getUUID()); BaseUserTask definition = n.getContent().getDefinition(); UserTaskPropertyWriter p = propertyWriterFactory.of(task); TaskGeneralSet general = definition.getGeneral(); p.setName(general.getName().getValue()); p.setDocumentation(general.getDocumentation().getValue()); p.setSimulationSet(definition.getSimulationSet()); BaseUserTaskExecutionSet executionSet = definition.getExecutionSet(); p.setTaskName(executionSet.getTaskName().getValue()); p.setActors(executionSet.getActors()); p.setAssignmentsInfo(executionSet.getAssignmentsinfo()); p.setSkippable(executionSet.getSkippable().getValue()); p.setGroupId(executionSet.getGroupid().getValue()); p.setSubject(executionSet.getSubject().getValue()); p.setDescription(executionSet.getDescription().getValue()); p.setPriority(executionSet.getPriority().getValue()); p.setAsync(executionSet.getIsAsync().getValue()); p.setCreatedBy(executionSet.getCreatedBy().getValue()); p.setAdHocAutostart(executionSet.getAdHocAutostart().getValue()); if (executionSet instanceof UserTaskExecutionSet && Boolean.TRUE.equals(((UserTaskExecutionSet) executionSet).getIsMultipleInstance().getValue())) { p.setCollectionInput(((UserTaskExecutionSet) executionSet).getMultipleInstanceCollectionInput().getValue()); p.setInput(((UserTaskExecutionSet) executionSet).getMultipleInstanceDataInput().getValue()); p.setCollectionOutput(((UserTaskExecutionSet) executionSet).getMultipleInstanceCollectionOutput().getValue()); p.setOutput(((UserTaskExecutionSet) executionSet).getMultipleInstanceDataOutput().getValue()); p.setCompletionCondition(((UserTaskExecutionSet) executionSet).getMultipleInstanceCompletionCondition().getValue()); } p.setOnEntryAction(executionSet.getOnEntryAction()); p.setOnExitAction(executionSet.getOnExitAction()); p.setContent(executionSet.getContent().getValue()); p.setSLADueDate(executionSet.getSlaDueDate().getValue()); p.setBounds(n.getContent().getBounds()); return p; }

Target:
private PropertyWriter userTask(Node<View<BaseUserTask>, ?> n) { org.eclipse.bpmn2.UserTask task = bpmn2.createUserTask(); task.setId(n.getUUID()); BaseUserTask definition = n.getContent().getDefinition(); UserTaskPropertyWriter p = propertyWriterFactory.of(task); TaskGeneralSet general = definition.getGeneral(); p.setName(general.getName().getValue()); p.setDocumentation(general.getDocumentation().getValue()); p.setSimulationSet(definition.getSimulationSet()); BaseUserTaskExecutionSet executionSet = definition.getExecutionSet(); p.setTaskName(executionSet.getTaskName().getValue()); p.setActors(executionSet.getActors()); p.setAssignmentsInfo(executionSet.getAssignmentsinfo()); p.setSkippable(executionSet.getSkippable().getValue()); p.setGroupId(executionSet.getGroupid().getValue()); p.setSubject(executionSet.getSubject().getValue()); p.setDescription(executionSet.getDescription().getValue()); p.setPriority(executionSet.getPriority().getValue()); p.setAsync(executionSet.getIsAsync().getValue()); p.setCreatedBy(executionSet.getCreatedBy().getValue()); p.setAdHocAutostart(executionSet.getAdHocAutostart().getValue()); if (executionSet instanceof UserTaskExecutionSet) { UserTaskExecutionSet taskExecutionSet = (UserTaskExecutionSet) executionSet; if (Boolean.TRUE.equals(taskExecutionSet.getIsMultipleInstance().getValue())) { p.setCollectionInput(taskExecutionSet.getMultipleInstanceCollectionInput().getValue()); p.setInput(taskExecutionSet.getMultipleInstanceDataInput().getValue()); p.setCollectionOutput(taskExecutionSet.getMultipleInstanceCollectionOutput().getValue()); p.setOutput(taskExecutionSet.getMultipleInstanceDataOutput().getValue()); p.setCompletionCondition(taskExecutionSet.getMultipleInstanceCompletionCondition().getValue()); } } p.setOnEntryAction(executionSet.getOnEntryAction()); p.setOnExitAction(executionSet.getOnExitAction()); p.setContent(executionSet.getContent().getValue()); p.setSLADueDate(executionSet.getSlaDueDate().getValue()); p.setBounds(n.getContent().getBounds()); return p; }