WfMS

Post any questions you have about using the Verj.io Studio, including client and server-side programming with Javascript or FPL, and integration with databases, web services etc.

Moderators: Jon, Steve, Ian, Dave

azaleas
Ebase User
Posts: 81
Joined: Thu Jul 30, 2015 12:44 pm

WfMS

#1

Postby azaleas » Sun Nov 29, 2015 8:14 am

I've been going through the WfMS tutorial (Laptop request and approval). I've encountered some errors in the end:

1) When I enable Ufs.logonExitServlet:
a)
At the authentication prompt enter your usual Designer username and password. The LAPTOP_REQUEST form will appear.
In my case, I dont get any authentication prompts and LAPTOP_REQUEST form appears anyway. I request the laptop, get the confirmation message.

b) I can't open WF_TASKLIST form , and the error message comes up:

Logon failed, reason:
code: ????? description: no user or error code returned by web service


2) When I disable Ufs.logonExitServlet:
I make the request on Laptop_request form and on WF_TASKLIST form, I get this error:

Error getting task list from workflow system - Caller cannot be null for API method getFilteredTasks


Questions:

1) How should this errors be fixed?

2) In the tutorial users and roles are Ebase users and roles. But I'd like to use my custom users, roles and etc. which will come from DB table. I want to use Logon Service for user authentication (but without XiLogonExit) + Workflow Management. How can I achieve this?

I'm using v4.5.2
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

#2

Postby Jon » Mon Nov 30, 2015 8:57 am

It looks as if the Logon Service is failing. This needs to be separately implemented and tested before you can use the workflow system. If necessary, you can go back to the logon service supplied with the system. The workflow task list, and most of the workflow system, requires a signed on user. The task list will fail with the message that you are seeing "Caller cannot be null for API method getFilteredTasks". It really just means that there is no userid so the system can't return a task list.

If the logon exit is disabled, you need to ensure that any user who wants to access the workflow system has been signed on first.
0 x

azaleas
Ebase User
Posts: 81
Joined: Thu Jul 30, 2015 12:44 pm

#3

Postby azaleas » Mon Nov 30, 2015 9:10 am

I've downloaded the sample for the Laptop exercise and found my errors. But, I still have some struggling. It seems like WfMS is an advanced topic and it will require some additional time to understand it and implement it accordingly.

Here's a scenario:

Let's take Laptop purchasing.

For this example I create my DB with three tables: USERS, REQUESTS and APPROVAL.

1) Users table has all the details about logged in users (Roles, credentials etc). It will be attached to the LOGIN form which will be controlling the APPROVAL Form. So,
  • a) User enters credentials.
  • b) Script checks if the user exists in DB via Logon Service.
  • c) User exists in DB and have a role of Manager.
  • d) Script takes the user to Management form where Requests table is fetched, showing only those rows which have a status of waiting for approval
  • e) When Manager clicks the hyperlinked id of one of the requests, script takes him to approval form, where he will decide either approve or decline. If declined, add a comment
  • f) Once manager clicks save, script sends email to the customer, and the status of request is changed, so it won't appear in Requests table
So, we have three forms: Request, Approval and Manager control.

Now, the questions:

1 ) I guess we can reduce the amount of forms to one, simply by adding login service and role check. Am I right with this assumption?

2) The above scenario can be done without a WfMS. So, what would be the benefit of using WfMS?

3) How to use Custom Manager Control form instead of Workflow tasklist form?

4) If I want to use WfMS for the above scenario (where everything is Custom created), how can it be done?

Please forgive me for this newbie questions. But, I just have the feeling that with WfMS it would get much more complicated. I hope I'm wrong.
It would be my first implementation of WfMS with the project, so that's why I have so many questions and I got so confused.
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

#4

Postby Jon » Tue Dec 01, 2015 8:54 am

You don't have to use the workflow system to accomplish your Request/Approval scenario. You could do this just with forms and use an email as a notification mechanism e.g. a new request has arrived which needs approval.

The workflow system is based on really simple ideas. You design an execute a workflow process (a business process) which is just a list of tasks connected into a flow diagram. The business process is commonly "request" based but it could be any process which can be defined and sub-divided into multiple tasks. There are two types of tasks: interactive tasks i.e. something done by a person - these are nearly always a form, and system tasks - these are just scripts. Interactive tasks are assigned to individual people or any person having a role, so to accomplish this all users participating in the workflow system must signon first - at this point the system will also identify which roles each individual has. Once the user has signed on, the system can then show a task list - this is just a list of the interactive tasks that are already assigned to the user or could be assigned to the user e.g. user has the manager role but is one of many users with this role. Ebase workflow has a very flexible assignment mechanism and this can be confusing but in most cases assignment is just based on a simple role.

Why use the workflow system? For the simplest examples e.g. Request/Approval, you could get away without using workflow. But as soon as you want to do something else, it would start to get very complicated. For example, you could construct a task list based on a Requests table, but how about if the task to be executed wasn't based on a request or was a request to do something completely different? Or what if the email is lost or ignored. And many more questions like this.
0 x

azaleas
Ebase User
Posts: 81
Joined: Thu Jul 30, 2015 12:44 pm

#5

Postby azaleas » Tue Dec 01, 2015 4:03 pm

Thanks for the answer Jon,

I'll be using WfMS in my projects, no doubt. That's why I'm trying to understand how to use it.

So, about the roles. If I create a role in CustomRoles table (copy the role from my DB table) after login (LoginService), can I use that role for WfMS purposes(Assigment of tasks and etc)?

I'll try to re create the tutorial using custom DB tables. Meanwhile, is there any WfMS demos or samples (but with real life application) available?
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

#6

Postby Jon » Tue Dec 01, 2015 4:28 pm

If I create a role in CustomRoles table (copy the role from my DB table) after login (LoginService), can I use that role for WfMS purposes(Assigment of tasks and etc)?
Yes
Meanwhile, is there any WfMS demos or samples (but with real life application) available?
The workflow tutorial does the same thing as you are trying to do: it assigns a task to a role. And the supplied Logon Service populates custom roles at login time. I'm afraid we don't have any more samples.

I would recommend treating the login configuration as a separate task from the workflow configuration i.e. get your Logon Service working first and test that the roles for each user are being picked up. Then move on to workflow.
0 x

azaleas
Ebase User
Posts: 81
Joined: Thu Jul 30, 2015 12:44 pm

#7

Postby azaleas » Tue Dec 01, 2015 4:49 pm

Thanks Jon, will do.
0 x


Who is online

Users browsing this forum: No registered users and 19 guests