Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
7 replies
Subscribers
9 subscribers
Views
2895 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
In our Application, Process models are chained. User can step back to any node a
komalk
over 9 years ago
In our Application, Process models are chained. User can step back to any node anytime. So there are few nodes e.g. save data to DB , should be called only once. Even if user steps back many times, node should be executed once. Please help m to know, how to configure node to run only once?
Should we go for MNI with instance number=1 only?
OriginalPostID-167503
OriginalPostID-167503
Discussion posts and replies are publicly visible
0
rawich
over 9 years ago
In the Process Modeler, open the node that save data to DB, you have to uncheck "Allow users to step back to this node from the next chained activity." in Other tab.
If you only want data to be written once, you can't let user go back to this node.
MNI instance number is the number of instances that will be executed each time the node is activated. So this won't help you.
If you still see the need to let user go back to previous nodes (before the save to DB), you'll have to do the flow navigation based on additional buttons on the UI screen, instead of relying on the Step Back feature. You also need to think about what do you want to do with the data already written, if the user made some changes. Most likely, you'll have to do the update, instead of inserting new row.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Rahul Gundu
over 9 years ago
Hi komal,
My suggestion is, make a separate workflow using rule event, for database node(s), which is independent of main flow and trigger the rule event using a pv when it required to execute.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Sumeet Khare
over 9 years ago
@Komalk: Adding to Rahul's suggestion, you just keep user input task and those script where you are not doing any heavy activity in chain and other nodes should in a parallel flow.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
PhilB
A Score Level 1
over 9 years ago
Are you only executing the save to database node once to prevent duplicate rows? If so, have you considered using the output on the save node to place the saved values into the pv? That way each time it will just update the saved values.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sanjays0006
over 9 years ago
Hi,
I think the below procedure works:
Have the Save to DB in a subprocess.
In the subprocess, make sure that you use a flag and write a condition that If flag is true, then only run the DB node else DO not perform any task and simply exit the subprocess.
In the main process, for the first time, after the subprocess(Save to DB) is completed, change the flag from true to false.
So whenever the subprocess is called, I think because of the flag ,Save to DB task would not be executed.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sikhivahans
over 9 years ago
@komalk Until and unless there are no heavy database updates which leads to chaining issues, a pretty straight forward as well as simple approach should be as specified by Phil - Use the same PV in the inputs and outputs of Write to Data Store Entity smart service.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
komalk
over 9 years ago
Thanks for all good suggestions. implemented pv approach.. it is wrking now.. Thanks again
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel