How to manage roles and generate web-forms using Drools Flow? - drools

I am creating a workflow(integrated into a Java web application) for a leave application approval. The workflow is as follows:
Leave request is raised for an employee.
Case 1: If employee's role is not team lead.
The request is sent to employee's team lead.
If team lead rejects, workflow ends.
If team lead approves, request is forwarded to manager.
Case 2: If employee's role is team lead.
The request is directly sent to Manager.
Workflow ends when manager approves/rejects the application. At the time of approval/rejection the user needs to enter a comment.
I need to generate web-form for user input. The options can be dynamic and should be defined in workflow itself. How can I achieve this? What is the right way to manage different directions of a workflow based on different roles?
Any thoughts/suggestions are welcome. It will be helpful if someone can direct me to example/sample code to achieve this.

You might be interested in Jboss Tohu - it's a framework that generates web forms from Drools workflows and rules. I'm not entirely sure if it is production ready yet, but it looks to have a reasonable amount of functionality.

Related

Building a simple web form that connects to Recurly's API to allow a subscriber to change their subscription plan

I am trying to build a simple web form that would ideally sit on a WordPress page to allow the subscribers on our platform to change or update their subscriptions, without having to ask our support team (currently they can only cancel, but we want to offer them the option to upgrade).
We use Recurly to manage our billing, and their support team said:
'You would essentially want to build a form that will input values into the Subscription Update API request, that would then be sent to Recurly to make the changes on your customer account.'
They also shared the following document: https://dev.recurly.com/docs/update-subscription
I have limited experience of working with APIs and am also aware that because this form deals with sensitive information (the user ID of a subscriber in this case), I don't want to inadvertently jeopardise the accounts of the subscribers that choose to do this.
Any help would be much appreciated. I have tried searching for a solution but am unsure how to word my request effectively.
It sounds like using the Recurly Hosted UI might be your best bet. Instead of having to build a a web form you can just redirect your customer to the Recurly Hosted UI on a button click. You can retrieve and redirect the url using the Recurly API on your Wordpress site using some simple PHP and then that allows the customer to view invoices, change their plan (if you allow), and change CC information.

AD VSTS: Having business users submit feature requests/bugs

We use Visual Studio Team Services backed by Azure AD and want any user in our AD to be able to submit a feature or bug. I know some products like Jira allow this either through their issue collector or via email. It seems with VSTS the user has to be a stakeholder in the project or else they would receive a 401 (I tested with one user in our AD). Has anyone found a good solution or extension that allows AD users (or users external to the project) to submit features requests/bugs to a VSTS project? Or do we have to create something utilizing VSTS's REST API?
The user must be added to your VSTS, then he can submit a feature or bug work item. Regarding personal access token (can call Work item REST API), it is created by the user in your VSTS too, it is not recommended, because of the security issue and you don’t know who submit the feature or bug, it’s hard to manage.

How to pass data beetween author to publish and vice versa in AEM /CQ5

I have very different requirement in AEM.
A author will initiate workflow. Workflow will activate the page on publish and It is still running on author instance. On publish a workflow will trigger (May be using Launcher) on the activated page and will call some third party service.Third party service returns result and pass to author instance. workflow which is already running on author instance, will read the result coming from publish , do the necessary things and notify the author. Author will login to his inbox and he may complete the workflow or redo.
I know it is a bit different . Please share your thoughts, how can I achieve this?
Use Replication and Reverse Replication Agents to exchange data from Author <-> Publish (1).
But based on your description I'd suggest you do not replicate the data at all but you could simply call the third party service directly from the author instance - using an EventHandler or WorkflowLauncher.
(1): https://docs.adobe.com/docs/en/aem/6-1/deploy/configuring/replication.html#Configuring%20Reverse%20Replication

How to Configure IdentityManager

I'm at the early days of looking into IdentityServer v3 and IdentityManager, as I'm certain those guys are more clued up than I, but I cannot see how to configure the IdentityManager.
If we're deploying IdentityManager to a client, all the client want to do is "standard admin type stuff", such as
create users
unlock accounts (e.g. after 3 failed login attempts)
suspend accounts (not paid your bill, tut tut...)
delete users
..rather than amend claims, roles and suchlike (presumably these would be hidden from the Administrators).
What am I missing?
Or, is the IdentityManager supposed to be used by the implementation team installing the thing, and then the business administrators who deal with the topics listed above actually don't use IdentityManager at all, but a separate admin site we have to write? As far as I can make out all the pages, htm letc is within the nuget package so cannot be amended by me.
If it makes any difference, we're trying to create a public facing website that can be logged into, but the users are only created by the company, whose admin site to create & administer the users is IP restricted / not public facing.
Identity Manager is aimed at developers and internal administrators for testing and initial configuration purposes, as opposed to end users.
Check out https://vimeo.com/125426951 by the repo's author. I think it's explicitly stated at around the 1 minute mark. It's mentioned on the Github issue tracker quite frequently too.
Also, it's not that extensible yet, so you won't be able to brand it or remove sections (such as your requirement of no claims).

What are some best practices for basic workflow using biztalk 2009?

I'm working on a Biztalk 2009 proof of concept project and would like to setup a basic approval workflow.
Request Vacation.
Step 1. Request Vacation.
Step 2. Route Request to Manager.
Step 3. Manager Approve / Denies Vacation.
Step 4. Update Vacation Calender / Notify Originator of Approval.
Outside of Biztalk I'll have to provide an interface for requesting vacation and approving vacation.
How do I get the list of items pending approval for my manager?
I'm confused about if the list of pending items should be maintained / queried from Biztalk, or if I need to build a separate set of tables to manage what is awaiting approval.
Any help or suggestions would be greatly appreciated!
At it's core, BizTalk is a messaging bus (okay, not really, but it's a useful abstraction). It doesn't actually store data on its own. In point of fact, I'm not sure based just on this scenario that BizTalk is your best bet. If you have SharePoint, using normal WorkFlows through SharePoint might work better for you.
That said, if the BizTalk decision has been made, I'd do the following:
Interface for requesting / approving
The Approval interface would hook into a data store (probably a SQL DB) to get a list of the "waiting approval" items.
Once the status of the item is set to "Approved" or "Denied" have SQL push data to BizTalk to kick off the rest of the process.
To your specific quesiton: yes, you'll need some place outside of BizTalk to store the requests, and the list of "pending" requests would be better generated from that store.