/**
* There are tests around FlowTransitions in {@link TestFlowTransitions#testAvoidConflictsOnFlowTransitions()}
*/
@Test(enabled=TEST_ENABLED)
public void testFlowPropertyUsage() {
FlowTestingUtils flowTestingUtils = new FlowTestingUtils();
String propertyName = "propertyName";
FlowPropertyDefinitionImpl flowLocalProperty = new FlowPropertyDefinitionImpl(propertyName, String.class).initAccess(flowLocal,initialize).initInitial("true");
FlowActivityImpl flowActivity0 = newFlowActivity();
flowActivity0.setFlowPropertyProviderName("activity0");
flowActivity0.addPropertyDefinitions(flowLocalProperty);
FlowActivityImpl flowActivity1 = newFlowActivity();
flowActivity1.setFlowPropertyProviderName("activity1");
FlowPropertyDefinitionImpl activityLocalProperty = new FlowPropertyDefinitionImpl(propertyName, String.class).initAccess(activityLocal,internalState);
flowActivity1.addPropertyDefinitions(activityLocalProperty);
FlowActivityImpl flowActivity2 = newFlowActivity();
flowActivity2.setFlowPropertyProviderName("activity2");
FlowPropertyDefinitionImpl globalProperty = new FlowPropertyDefinitionImpl(propertyName, String.class).initAccess(flowLocal,io);
flowActivity2.addPropertyDefinitions(globalProperty);
String flowTypeName = flowTestingUtils.addFlowDefinition(flowActivity0, flowActivity1, flowActivity2);
FlowManagement flowManagement = flowTestingUtils.getFlowManagement();
Map<String, String> initialFlowState = FlowUtils.INSTANCE.createState(propertyName, "maybe");
FlowState flowState = flowManagement.startFlowState(flowTypeName, false, initialFlowState , null);
assertNotNull(flowState);
String propertyValue = flowState.getProperty(propertyName, String.class);
assertEquals("true",propertyValue, "flowState="+flowState+" propertyValue="+propertyValue);