How can I open slack modal during slack workflow execution step? - slack

I am currently working on slack app with custom workflow step which is used to get some data from user during execution using modals,
I can do that using built-in forms from workflow builder like in the attached image.
Built in workflow form
However my form is more interactive and requires input fields to be changed based on user selection, to do that I am trying to consume https://slack.dev/java-slack-sdk/guides/modals API with custom workflow step.
My question is, do I have any chance to call open modal API, during custom workflow execution step: https://api.slack.com/events/workflow_step_execute ?
So far I failed to identify what can I use as triggerId during workflow step execution.
Thank you in advance and I do understand my question is complex, so will be happy to provide more information.

Unfortunately, it's not possible to trigger a modal from within a Workflow. Workflow Builder currently doesn't support conditional interactivity either. Sorry I don't have better news. On the plus side, Workflow Builder is going to see some significant upgrades this year!

Related

Alfresco activiti review task: required form field on reject

I have an Alfresco (5.2.4) platform with a custom document approval workflow.
When a user rejects a document he/she has to write a comment to justify the rejection, but that comment is mandatory only in that case.
How can I achieve that?
I'm searching for some activiti-like solution, using boundary events or Intermediate Throwing/Catching Events.
On the other hand, can I use a simple javascript dialogue to stop the workflow execution and make the user fill the comment box?
Does anyone know the best approach?
Thanks

How to build a simple form in CQ5

I have started a new AEM project in eclipse that has
core
launcher
tests
ui.apps
ui.content
I have a local instance of 5.6.1 running and I would like to create a very simple form (firstname, lastname) and have it persist data such that I can view data for all forms submitted. Also, I would like for the form to be approve/rejected (e.g. user1 submits the form, user2 accepts/rejects it).
I'm new to AEM and have been looking at docs and trying to find a tutorial for it for a while now but haven't been successful.
Question
Can someone please walk me through how to accomplish this simple form? Once I can do this I can build-up more functionality on my own.
What I've tried
I tried to create a form in the Geometrixx Media site but I don't see form template there.
I also tried following this tutorial but it didn't help since its for 6.0 and is confusing to the point that I don't follow it at all.
You need some basic understanding of how cq/aem works in order to accomplish the task you started. But in the simplest use case, you need the following things:
You can create new cq page component and define in the jsp the html markup of the form you need
Or you can build a page/component using the /libs/foundation/components/form components. Start reading the best from the page developing forms.
The form action can point to the component itself where you can store the data (if you create a page with a component who is responsible for rendering the form) and in this case you can let sling post processor to handle the data storage or you can define your own action with a servlet where you can create a node on your desired location.
The second part of you question is about approving/rejecting submitted data. I guess, that you are talking about workflows. Every time the form is submitted you have to create a new node (or let sling to create it) and than start a workflow for moderating the content. You use here as example the implementation of the social comments and the moderation workflow.

How do I sanitize a workflow uploaded by a user?

I have a multi-tenant application that may run arbitrary workflows as needed.
I plan on using the workflow designer to create these workflows, but even if I limit the Activities in the Toolbox, that doesn't prevent a malicious user from editing his own XAML file, doing activities I'd rather them not (specifically calling out to the .NET framework)
For a given workflow, how do I verify that the only actions being used are those I approve of? Is an XPath query the only way, or is there a feature within WF that will validate this?
If you need a visual introduction to what I'm looking for here is a sample project and video referring to it.
I'd just load the workflows in a sandboxed AppDomain. You can Use the GetStandardSandbox static method of the SecurityManager to set this up relatively easily (and safely).
Of course, I haven't actually done this yet, but I'm definitely thinking about adding some of this to my current WF code (which does use AppDomains to isolate execution of workflows from my application).
All you can do is load the XAML as XML and check what is in there. And make sure to check any VB expression entered as users can put interesting things in there as well.

Count Activities from an opportunity

I have a workflow on an opportunity. I am trying to count the number activities from the opportunity workflow.
And use this count on condition within the workflow.
I agree with Matt's answer. You need to hook a custom workflow activity in order to get the Opportunity object that you are currently interesting on, and finally inside the custom workflow activity, you can use CRM SDK to find the related activites regarding the opportunity.
Here is the link to setup a basic custom workflow activity : http://www.stunnware.com/crm2/topic.aspx?id=CustomWorkflowActivity
I don't believe there's a way to accomplish this natively in the workflow engine. You'll have to create a custom workflow activity that gets this count for you and then returns it to the workflow, and then you can use it within your condition.
An example of some custom activities on CodePlex:
http://crm4activities.codeplex.com/
Custom workflow activity documentation on MSDN:
http://msdn.microsoft.com/en-us/library/cc151142.aspx

Workflow engines that integrate easily/work well with Spring Web?

I have a Spring MVC web application that I need to introduce workflow into and was wondering if anyone had recommendations on existing products that would integrate well/easily with Spring.
The steps (if that's the term) in any given workflow may or may not involve user interaction - so you could imagine kicking off something like a sign-in workflow that involves the following steps:
- user choosing a login name and password and submitting
- once submitted an email is generated with a confirmation URL
- on click of the confirmation URL the user is asked a few more questions and then the account is enabled
- if URL is not click on in three days a reminder is sent
- if URL is not clicked on after reminder is sent, account is deleted
Admittedly this is a workflow that could be solved without a workflow engine and I'm just using the example to illustrate that the steps involved in the workflows may or may not involve user interaction, have a time element and a concept of branching on certain event.
I had a look at Spring WebFlow and this seems more geared toward putting webpages together in a certain order to achieve a particular flow through the UI as opposed to specifying a persistent workflow.
I had a look at Spring Workflow Extensions but (a)the documentation seemed a bit thin on the ground and (b) its still in incubation state, both of which make me a bit nervous.
Any suggestions?
I've worked with and evaluated a few workflow engine solutions. In general, they end up being so complicated to setup, it ends up being easier to code your workflow by hand. There is one open source project called OS Workflow that looks like it takes this complexity into account, but I haven't had an opportunity to give it a closer look yet. Also it doesn't look like the product is under active development currently.
I've used jBPM on a project, but I found the product to be confusing and not well documented. We ended up only using a very small set of the functionality and we plan on eventually replacing the functionality we're using with something homegrown.
Both frameworks also have Spring support via the Spring Modules project (which also looks to no longer have any development activity).
A quick google search found me this article on popular Java workflow solutions, but I'm not familiar with most of these products.

Resources