Trigger a workflow using Dynamic JSSP page | Community
Skip to main content
malarrajans8868
Level 2
May 19, 2017
Solved

Trigger a workflow using Dynamic JSSP page

  • May 19, 2017
  • 1 reply
  • 2920 views

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'.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by somasundaram_h

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/

1 reply

somasundaram_h
Community Advisor
somasundaram_hCommunity AdvisorAccepted solution
Community Advisor
August 1, 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/