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 Send Private Message
Posts: 24
Advanced Member

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 Send Private Message
Posts: 1127
Veteran Member
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 Send Private Message
Posts: 477
Veteran Member
Or, save a value in a user_field or comment, so you can track what has already been done.
adnan512
Advanced Member Send Private Message
Posts: 24
Advanced Member
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 Send Private Message
Posts: 1127
Veteran Member
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 Send Private Message
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 Send Private Message
Posts: 24
Advanced Member
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();
}