I created workflow that will run script from wich I try to create connection and login ticket for certain user and send that trough email to that user.
Main line is this:
Connection connectionForExternalUser = ConnectionManager.getConnection("host name", 8443, ConnectionManager.HTTP_MODE, "user name", "user pass");
When i hardcode "host name" and "port" everything works fine from SA and from CC also. But when I try to get host name trough API, one of the next examples:
host0 = context.getConnection().getHost();
host1 = context.getScript().getProject().getUserService().getConnection().getHost();
host2 = context.getUserService().getConnection().getHost();
host3 = context.getProject().getConnection().getHost();
host4 = context.getProject().getUserService().getConnection().getHost();
host5 = context.getElement().getProject().getConnection().getHost();
then it works from SA (it returns server host name) but not from CC (returns empty string for every case). And I found that from CC I am getting diferent context and connection object then from SA.
SA:
workflow script context: class de.espirit.firstspirit.impl.access.store.templatestore.WorkflowScriptContextImpl
workflow context: class de.espirit.firstspirit.client.gui.workflow.GuiHostWorkflowContext
connection: class de.espirit.firstspirit.client.io.ConnectionImpl
CC:
workflow script context: class de.espirit.firstspirit.webedit.server.workflow.WebeditWorkflowScriptContextImpl
workflow context: class de.espirit.firstspirit.webedit.server.workflow.WebeditWorkflowContext
connection: class de.espirit.firstspirit.webedit.server.io.WebeditConnection
So, do you have any idea how I can get server host name and server port trough workflow-script from CC?