Trigger a workflow using Dynamic JSSP page

malarrajans8868

19-05-2017

Hi All.

I want to trigger a workflow using dynamic JSSP page. I have configured the workflow with external signal .In the JSSP page i wrote a postEvent method

<%@ page import="xtk:server/jsspcontext.js"   %>

<%@ page import="/nl/core/shared/nl.js,nms:amcIntegration.js"%>

<%

NL.require("/nl/core/api.js")

.require('/nl/core/queryDef.js')

.require('/nl/core/shared/xtk.js');

xtk.workflow.PostEvent("WKF11", "signal", "", "", false)

%>

When i access the JSSP page in the browser.

XTK-170019 Access denied.

SOP-330011 Error while executing the method 'PostEvent' of service 'xtk:workflow'.

Accepted Solutions (0)

Answers (1)

Answers (1)

somasundaramhal

01-08-2019

I guess this is a late reply. However, the solution might be the following.

As per the jssp page, the user/operator is anonymous. Hence you need to login.

<% var oldContext = logon('john-doe', 'password'); // login as john-doe
for(var i in application.operator){
  document.write(i+': '+application.operator[i]+'\n');

}

Use this inside jssp page. That should work for you. Reference:

.https://blog.floriancourgey.com/2018/11/create-jssp-dynamic-javascript-server-page-in-acc/