commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Premi John (JIRA)" <j...@apache.org>
Subject [jira] Created: (SCXML-43) SCXML parallelism
Date Thu, 12 Apr 2007 08:27:32 GMT
SCXML parallelism
-----------------

                 Key: SCXML-43
                 URL: https://issues.apache.org/jira/browse/SCXML-43
             Project: Commons SCXML
          Issue Type: Task
         Environment: Windows
            Reporter: Premi John
            Priority: Critical


Hi there,
We are trying to use SCXML for one of our use case where we have lots of state transitions
and event generated. I am having problem with having multiple transitions defined within a
state. I am attaching herewith the state diagram and the SCXML that I have tried creating.
Please give your suggestions on where I am wrong in defining the SCXML. 
Thanks
John
I am not able to attach the state diagram here and is there any forum where I can send attachments.



<?xml version="1.0"?>
<!-- Used for comparison with custom-hello-world.xml by CustomActionTest.java in model
package -->
<scxml xmlns="http://www.w3.org/2005/07/scxml"
	xmlns:my="http://my.custom-actions.domain/CUSTOM" version="1.0"
	initialstate="testMain">
	<state id="testMain">
		<parallel>
			<state id="slotState">
				<initial>
					<transition>
						<target next="MSlotInitState" />
					</transition>
				</initial>

				<state id="MSlotInitState">
				<initial>
				</initial>
					<onentry>
						<log expr="'Slot Init State'" />
					</onentry>
					<transition event="CreateATaskEvent"
								cond="_eventdata.slotAvailable=true"
								target="MSlotHeldState.aquireSlot" />
					<transition event="CreateATaskEvent" 
								cond="_eventdata.slotavailable=true" 
								target="MSlotLockedState.lockSlot"/>	
					<transition event="CreateATaskEvent"
								cond="!_eventdata.slotAvailable"
								target="MSlotQueuedState.queueSlot" />
							

				</state>

				<state id="MSlotLockedState">
					<onentry>
						<log expr="'----Slot Locked State----'" />
					</onentry>
					<transition event="CancelEvent"
								target="MSlotCancelledState.freeSlot" />
				</state>

				<state id="MSlotCancelledState.freeSlot">
					<onentry>
						<log expr="'----Slot Cancelled or Freed State----'" />
					</onentry>
				</state>


				<state id="MSlotHeldState.aquireSlot">
					<onentry>
						<log expr="'Slot Held State'" />
					</onentry>
					<transition event="JobCompleteEvent"
								target="MSlotFreedState.releaseSlot" />

				</state>
				<state id="MSlotLockedState.lockSlot">
				<onentry>
					<log expr="'Slot locked State'"/>
				</onentry>
					<transition event="SlotReadyToBeHeldEvent" target="MSlotHeldState.aquireSlot" />
				</state>	
				<state id="MSlotQueuedState.queueSlot">
					<onentry>
						<log expr="'Slot Queued State'" />
					</onentry>
				</state>
				<state id="MSlotFreedState.releaseSlot">
					<onentry>
						<log expr="'----Slot Freed State----'" />
					</onentry>
				</state>

			

			</state>

			<state id="taskState">
				<initial>
					<transition>
						<target next="MTaskInitState" />
					</transition>
				</initial>
				<state id="MTaskInitState">
					<onentry>
						<log expr="'Task Init State'" />
					</onentry>
					<transition event="SlotHeldEvent"
								cond="_eventdata.aquireTaskId eq AQUIREtaskId"
								target="MTaskFiredState.fireTask" />
					<transition event="CreateSimpleTaskEvent" 
								cond=""
								target="MTaskScheduledState.scheduleTask"/>
					<transition event="SlotHeldEvent"
								cond="_eventdata.releaseTaskId eq RELEASEtaskId"
								target="MTaskScheduledState.scheduleTask" />


				</state>
				<state id="MTaskFiredState.fireTask">
					<onentry>
						<log expr="'Task Fired State'" />
					</onentry>
					<transition event="JobCompleteEvent"
								target="MTaskCompleteState.completeTask" />
				</state>

		 	<state id="MTaskScheduledState.scheduleTask">
				<onentry>
					<log expr="'Task Scheduled State'"/>
				</onentry>  
			</state>
				<state id="MTaskCompleteState.completeTask">
					<onentry>
						<log expr="'-----Task Completed State----'" />
					</onentry>
				</state>

				<state id="MTaskScheduledState">
					<onentry>
						<log expr="'-------Task Scheduled State-------'" />
					</onentry>
					<transition event="CancelEvent"
								target="MTaskCancelledState.cancelTask" />
				</state>
				<state id="MTaskCancelledState.cancelTask">
					<onentry>
						<log expr="'-----Task Cancelled State----'" />
					</onentry>
				</state>

			</state>
		</parallel>
	</state>
</scxml>





-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message