Workflow
9 posts
• Page 1 of 1
Workflow
Hi,
I'm looking around in Workflow
In my project approval workflow I want to introduce an approval screen, so I first create a ToDo and then when the user having the ToDo clicks on Action in his ToDo list, I want to a popup window to open where the user can review and approve. But I'm not shure how to open a popup window from the Workflow. I guess I'll have to create a custom function in .java file and then have a Client Call to that function, but it is not clear to me how this function should look like and where in the app directory I must put this .java file?
Regards
Luc
I'm looking around in Workflow
In my project approval workflow I want to introduce an approval screen, so I first create a ToDo and then when the user having the ToDo clicks on Action in his ToDo list, I want to a popup window to open where the user can review and approve. But I'm not shure how to open a popup window from the Workflow. I guess I'll have to create a custom function in .java file and then have a Client Call to that function, but it is not clear to me how this function should look like and where in the app directory I must put this .java file?
Regards
Luc
- lucdep
- Posts: 53
- Joined: Wed Oct 10, 2018 12:01 pm
Re: Workflow
Not sure, what you exactly want:
Your workflow inserts/updates a todo in your custom table?
1) The user logs in and should get a popup with information about a new record/state and with a Button to do something?
1.1) The user is already logged in and the same popup should be opened?
2) The user logs in and nothing will happen until a specific work-screen will be opened. The work-screen shows that something happened and has some buttons to start different actions?
2.1) The user is already logged in and nothinw will happen until he opens the work-screen?
Did you check our built-in ToDo functionality? WF engine comes with a todo extension... It's easy to add some columns to the used table.
Your workflow inserts/updates a todo in your custom table?
1) The user logs in and should get a popup with information about a new record/state and with a Button to do something?
1.1) The user is already logged in and the same popup should be opened?
2) The user logs in and nothing will happen until a specific work-screen will be opened. The work-screen shows that something happened and has some buttons to start different actions?
2.1) The user is already logged in and nothinw will happen until he opens the work-screen?
Did you check our built-in ToDo functionality? WF engine comes with a todo extension... It's easy to add some columns to the used table.
-
Support@SIB - Posts: 355
- Joined: Mon Sep 28, 2009 1:56 pm
Re: Workflow
You could use the function: Client call
If you leave the username blank, all clients will execute the call.
The call is done on application context, so if you call a method which is available in your application, it will be called, e.g.
In this method you can do whatever you want. It's a good idea to call this method in afterLogin().
It's also possible to create a work-screen without menu entry. You can open this work-screen via work-flow client call and also set this work-screen as welcome screen. The screen could check the current state and close immediately or stay open....
How to create a custom application?
Check the doc, e.g. Replace error dialog, Customize the application frame
If you leave the username blank, all clients will execute the call.
The call is done on application context, so if you call a method which is available in your application, it will be called, e.g.
- Code: Select all
public void checkApproval()
In this method you can do whatever you want. It's a good idea to call this method in afterLogin().
It's also possible to create a work-screen without menu entry. You can open this work-screen via work-flow client call and also set this work-screen as welcome screen. The screen could check the current state and close immediately or stay open....
How to create a custom application?
Check the doc, e.g. Replace error dialog, Customize the application frame
-
Support@SIB - Posts: 355
- Joined: Mon Sep 28, 2009 1:56 pm
Re: Workflow
Hi,
Thanks for
I created following method in TodoWorkScreen.java:
which I invoke in a "Client Call" step coming right after a "Wait for Todo" step
giving me this error:
What is going wrong?
Luc
Thanks for
I created following method in TodoWorkScreen.java:
- Code: Select all
public void checkApproval(String sID) throws Throwable
{
HashMap<String, Object> htParam = new HashMap<String, Object>();
htParam.put("lookupid", new BigDecimal(sID));
getApplication().openWorkScreen("com.sibvisions.apps.wftest.screens.ApproveWorkScreen", Modality.Modal, htParam);
}
which I invoke in a "Client Call" step coming right after a "Wait for Todo" step
- Code: Select all
checkApproval("[PROJ_ID]")
giving me this error:
- Code: Select all
java.lang.NoSuchMethodException: com.sibvisions.apps.projx.ProjX.checkApproval(java.lang.String)
at com.sibvisions.util.Reflective.call(Reflective.java:268)
at com.sibvisions.util.SimpleJavaSource.parseCallOrField(SimpleJavaSource.java:1755)
at com.sibvisions.util.SimpleJavaSource.parseCallsOrFields(SimpleJavaSource.java:1725)
at com.sibvisions.util.SimpleJavaSource.parseParameter(SimpleJavaSource.java:1312)
at com.sibvisions.util.SimpleJavaSource.parseParameterWithOperators(SimpleJavaSource.java:1356)
at com.sibvisions.util.SimpleJavaSource.execute(SimpleJavaSource.java:585)
at com.sibvisions.apps.workflowengine.Workflow.executeClientCall(Workflow.java:285)
at com.sibvisions.apps.workflowengine.Workflow$1.callBackResult(Workflow.java:71)
at javax.rad.remote.event.CallBackResultForward$1.run(CallBackResultForward.java:93)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:389)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
What is going wrong?
Luc
- lucdep
- Posts: 53
- Joined: Wed Oct 10, 2018 12:01 pm
Re: Workflow
Everything is right and the previous post contained:
So, simply create your own application class.
Sure, it's possible to use the method in your screen, but I guess your approval check should also work if screen isn't open?
This should work with your current test:
The call is done on application context, so if you call a method which is available in your application, it will be called, e.g.
So, simply create your own application class.
Sure, it's possible to use the method in your screen, but I guess your approval check should also work if screen isn't open?
This should work with your current test:
- Code: Select all
openWorkScreen("your.package.TodoWorkScreen").checkApproval("[PROJ_ID]")
-
Support@SIB - Posts: 355
- Joined: Mon Sep 28, 2009 1:56 pm
Re: Workflow
Instead of the HashMap parameter, it's supported to use: new Parameter("lookupid", new BigDecimal(sID))
-
Support@SIB - Posts: 355
- Joined: Mon Sep 28, 2009 1:56 pm
Re: Workflow
Hi,
It works now, thanks!
Can the the Parameter method be used when more than 1 parameter have to be given through? How does it go?
Regards,
Luc
It works now, thanks!
Can the the Parameter method be used when more than 1 parameter have to be given through? How does it go?
Regards,
Luc
- lucdep
- Posts: 53
- Joined: Wed Oct 10, 2018 12:01 pm
Re: Workflow
The parameter is defined as Parameter... so it is easy to use multiple Parameter instances.
-
Support@SIB - Posts: 355
- Joined: Mon Sep 28, 2009 1:56 pm
Re: Workflow
see javadoc of RemoteWorkScreenApplication
-
Support@SIB - Posts: 355
- Joined: Mon Sep 28, 2009 1:56 pm
9 posts
• Page 1 of 1