Trigger IPA only once using design studio

 6 Replies
 2 Subscribed to this topic
 52 Subscribed to this forum
Sort:
Author
Messages
adnan512
Advanced Member
Posts: 25
Advanced Member
Helpful Replier
Helpful Replier
Thanks for being such a helpful replier!
New Poster
New Poster
Congrats on posting!
Engaged Reader
Engaged Reader
You are an engaged reader!
Avid Reader
Avid Reader
Avid Reader art thou!

Hello All,

I have a design studio form with bunch of Submit buttons to kick off different IPA's that create number of "CSV" files for users. Is there a way to make sure job is only submitted once. During my testing I clicked on the submit button multiple time and I saw multiple work unit created in LMK. Any help will be appreciated.

Thanks 

David Williams
Veteran Member
Posts: 1127
Veteran Member
New Poster
New Poster
Congrats on posting!
Are you creating a PFI WorkUnit first? If so, you could query the Logan WorkUnit table to see if a trigger was created before allowing it to process.
David Williams
Ragu Raghavan
Veteran Member
Posts: 477
Veteran Member
New Poster
New Poster
Congrats on posting!
Engaged Poster
Engaged Poster
Wow, you're on a roll!
Avid Poster
Avid Poster
Seriously, you're a posting maniac!
Engaged Reader
Engaged Reader
You are an engaged reader!
Avid Reader
Avid Reader
Avid Reader art thou!
Or, save a value in a user_field or comment, so you can track what has already been done.
adnan512
Advanced Member
Posts: 25
Advanced Member
Helpful Replier
Helpful Replier
Thanks for being such a helpful replier!
New Poster
New Poster
Congrats on posting!
Engaged Reader
Engaged Reader
You are an engaged reader!
Avid Reader
Avid Reader
Avid Reader art thou!
David W: Work unit gets created once I click on submit button. I am new to IPA so not even sure how work unit can be created before kicking off the actual job. If you can point me in the right direction I would appreciate it.

Ragu R: I will try to play with user field comment and see if it works.
David Williams
Veteran Member
Posts: 1127
Veteran Member
New Poster
New Poster
Congrats on posting!
There is a way to trigger ProcessFlow (AGS call to WFWK.1) via JavaScript and that's what I was thinking.
David Williams
Tim Cochrane
Veteran Member
Posts: 154
Veteran Member
What does your code look like?? one of us could prob provide more help if we could see exactly what you're doing...
Tim Cochrane - Principal LM/IPA Consultant
adnan512
Advanced Member
Posts: 25
Advanced Member
Helpful Replier
Helpful Replier
Thanks for being such a helpful replier!
New Poster
New Poster
Congrats on posting!
Engaged Reader
Engaged Reader
You are an engaged reader!
Avid Reader
Avid Reader
Avid Reader art thou!
Please see my code below. All I want is to make sure IPA runs once even if user clicks on "submit" several times. Maybe I can disable the button once it's clicked. I think better way would be to check if IPA is processing and ignore the second "Submit" request.

var sUser = "";

function BUTTON_OnClick(id, row)
{
if (id == "push1")
{
//trigger flow
var s =portalWnd.AGSPath+"?_PDL="+strPDL+
"&_TKN=WFWK.1&_EVT=ADD&_RTN=DATA&_LFN=ALL&_TDS=IGNORE"+
"&FC=Add&SERVICE=NK_LMK_RoleList&WORK-TITLE=NK_LMK_RoleList"+
"&_DELIM=%09&_OUT=TEXT&_EOT=TRUE";
portalWnd.httpRequest(s);
lawForm.setMessage("Job 1 Submitted");
}

if (id == "push2")
{
//trigger flow
var s =portalWnd.AGSPath+"?_PDL="+strPDL+
"&_TKN=WFWK.1&_EVT=ADD&_RTN=DATA&_LFN=ALL&_TDS=IGNORE"+
"&FC=Add&SERVICE=NK_LMK_Out5&WORK-TITLE=NK_LMK_Out5"+
"&_DELIM=%09&_OUT=TEXT&_EOT=TRUE";
portalWnd.httpRequest(s);
lawForm.setMessage("Job 2 Submitted");
}


return true;
}

function FORM_OnAfterFrameworkInit()
{
sUser = portalWnd.oUserProfile.getId();
}