Good Evening Friends,
In my last Hybris interview i got
question about Bussiness Process in
Hybris and question was "What is
Node in Bussiness Process and How many type of Node in Bussiness Process"
Related to what is Bussiness process
which i allready discuss so lets discuss about type of Nodes in bussiness process
So what is Node?
After define process in hybris (through XML ) as below
<?xml
version="1.0"encoding="utf-8"?>
<process xmlns="http://www.hybris.de/xsd/processdefinition"
name="everyReplyProcess"
start="everyReplyStart"
onError="onError"
processClass="de.hybris.platform.fulfilment.model.ConsignmentProcessModel">
... ...
</process>
Then there is must to add content in
process and that content is steps of your process and each step is called Node
of process and each Node has tell below
1.
Which node has to be invoked next
2.
Each Node has ID
In above process definition there is one declare Node that is start node of your process in above
case everyReplyStart is declare node
In hybris there is below type of Node and there use
1. Action Node - Actions are the most
important part of the processengine
functionality. Normally, they have to implement
a logic or call specialized services to execute tasks that are necessary in
a process
example
<action
id="isEveryReplyProcessCompleted"
bean="bprocessesCompleted">
<transition
name="OK"to="sendNotification"/>
<transition
name="NOK"to="waitForComplete"/>
</action>
2. Wait Node - Lets during process you need to communicate to external environment or
need to wait for complete of subprocess
(inside process you can also define subprocess)
then we need to define wait node as below
<wait
id="waitForEverReplySubprocessEnd"
then="isProcessCompleted">
<event>EverReplySubprocessEnd</event>
</wait>
so after wait complete which sense by
your event given above call Node ID - isProcessCompleted
3. Split Node - Suppose during in process
you want to execute Actions in parallel then you can do by Split node as below
<split
id="splitNode">
<targetNode
name="node1"/> <targetNode name="node2"/>
</split>
4. Notify Node - Lets during process execution you
want to notify about status of process to someone then you define Notify Node in process as below
<notify
id="notifySomeOne"then="nextNodeID">
<userGroup
name="everyReplyGroup"message="Perform action"/>
</notify>
5. End Node - it is ends the process and stores state and message in a process
<end id="error"
state="ERROR">All went wrong.</end>
<end id="success"
state="SUCCEEDED">Everything was fine</end>
No comments:
Post a Comment