How to Create a Workflow From Scratch
- Overview
- Transcript
This video teaches you how to build an automated business process end to end using Una's workflow engine. It covers using a for-each loop to collect input from each department head, sending a Slack notification, and routing the result through a CFO approval step that either ends the workflow or sends it back for changes.
Facts to Remember
- Security groups define module, file, and dimension permissions; users added to a group inherit its permissions.
- You must save a workflow before you can run it.
- External integrations like Slack must be connected first under Settings > Connections before a workflow step can send a message to a channel.
- A workflow can be scheduled to run automatically (e.g. monthly, quarterly, annually).
Okay, I'm going to show you how to create a workflow from scratch.
First thing to note is the concept of security groups in Una.
So what we have is the ability to create a new group where in this group you will have certain module security settings, file permission security settings, and dimension security settings.
You can Add as many users to the group as you want.
And as you add them, they'll have the permissions that that group has.
So they'll inherit those permissions.
And so why is this important?
Is because I'm going to show you how to create a basic workflow in Una using a for each loop.
And security groups, as well as a Slack notification and approval.
So let's begin.
So this is the workflow screen.
You can see here there's the home which centers you.
You have, let me close this.
You have a run history.
So right now we have no history because it's a new workflow, but typically you can see the history of previous runs.
Here you have your toolbox, which is basically how you can build the workflow and all the tools you have or tasks you have access to.
Interactive activities, workflow activities, communication, integration, and AI.
I'm going to be using a lot of interactive activities and then the for each loop under workflow and the send Slack message under communication.
Under here, you have settings so you can change the scale of how much you want to zoom and anything related to the display of the workflow.
You can schedule the workflow, which I'm not going to do right now.
You can run the workflow, but you have to save it before running it.
So let's build our workflow first.
So I'm going to build, like I mentioned, a for each loop, and we're going to iterate through departments.
Topics include the Model Builder, Explorer, dimensions and hierarchies, data models, and importing data from flat files.
Topics include the Model Builder, Explorer, dimensions and hierarchies, data models, and importing data from flat files.
Topics include the Model Builder, Explorer, dimensions and hierarchies, data models and importing data from flat files.
On the editor, and then I can connect the nodes by going from the middle of the icon to the other icon.
And then I can specify if this arrow means success or error.
And for me, it means success when you go from start to the next node.
And then here I can right-click the node and click open.
And this is where the sub-process will get defined.
So here I want to have each department head input data.
So I'm going to bring in the data input task and connect the nodes.
So that means success.
And here I'll just put department OpEx plan.
Please input.
Expenses for, and then this allows, so this.name allows us to iterate through the different departments, depending on which department it is being displayed.
So I'll show you where that's configured.
For that department.
And then I want to attach a file.
So I'm going to attach the, so I clicked new file.
Let's go back.
So I clicked, I want to attach a file.
So I'm going to click new file and then click on the path.
And I want to attach the department OpEx input.
So the parameters I'm going to have here are the model is main, and then I'm just going to go with the filter parameters that are preset.
So the syntax here is filters.0 because it's the zero, the very first filter set, and then the dimension.
So filters.0.period, for example.
And then the next one's going to be filters.1.scenario because it's the second filter set.
And then the owner of the group, this is where that same syntax comes in.
So the owner will be head of this department because as you saw the security groups before are head of marketing, head of sales, head of finance, head of corporate, et cetera.
So this will account for head of and then iterate through the different departments.
Yeah, I'll just add myself as a contributor and then click Save.
So that's pretty much all I want to do here.
And then let's go back.
So if I click Edit, here is where I can update.
Expense plans.
So I can show that this is a, the 4-H loop is to update expense plans and I want to bring in for the department dimension, let's say corporate, sales, services, and marketing.
So just those departments for now.
And then I'll click save and then Let's add our next.
So once that's done and all those different department heads have submitted their expense plans, I want the owner of all those plans, such as like the CFO, to get a Slack notification saying that they have updated their plans.
So we brought that in.
Connected the nodes.
So what you will need to do is add Slack as a data source, which you can do under settings.
So here under connections, you can add a new connection and click Slack.
And then your OAuth token should be provided by your Slack admin.
And so once you enter that there and click save, you have connected Slack to Una and then you could bring in that Slack data source and then specify a channel workflow source as my channel and then say that the department heads have submitted their expenses.
And then save.
So now the CFO can go to approve it once that's done.
So they can.
So that will be approval.
And then let's attach the same plan.
So the department OpEx input, let's specify the model, which is main, and then similar to before, the filters.zero.department.
We're looking to improve.
This aspects that it's auto-filled.
Scenario.
And then a period.
Scenario.
So now I've attached the department OpEx plan and you can assign a due date if you want.
The finance should be the owner, which is the CFO or finance department as the owner.
So they will approve of the operating expense plans.
And then I put myself as the contributor.
And then we can just put a stop node.
So if it's approved, that's the end of the workflow.
If it's rejected, then the department heads have to go back and they get reassigned the OpEx tasks.
So let's save that.
So we have the start, the for each loop that iterates through.
The corporate sales services and marketing departments and the heads of those departments have to submit their expenses.
Once they do that, the CFO or head of finance gets a notification and then they have to go to view what they've submitted and approve of it.
And if they approve, it's the workflow ends.
And if they reject it, then we go back and the department heads have to update their plan.
So let's run the workflow. and start the workflow so here you can immediately see the feedback that the start node was successful and the next node is running which is the for each loop so you can see we're on the department expense plan for each department so under the actions icon if you click on that you can see all your different at a high level tasks that are upcoming and then Topics include the Model Builder,
Explorer, dimensions and hierarchies, data models, and importing data from flat files.
Topics include the Model Builder, Explorer, dimensions and hierarchies, data models, and importing data from flat files.
Typically corporate would just see their task only.
And so you can click on that and see the department OpEx input plan attached and then see the filters correspond with where the department head should be looking.
And so once they're done inputting their expenses, they can complete the task.
And same for all the other department heads.
So I'm just going to skip through and complete all the different tasks associated with each department head.
And then I got a Slack notification.
So here you can see that I got the Slack notification that the department heads have submitted their expenses.
In the channel we configured, so now as the finance head, I know that I can review and approve or reject the department OpEx input plan.
So I can see the plan for the finance department and all departments.
And if I approve, then the workflow has come to an end.
And you can see that here when I select the run.
So you can see everything is green and everything was successful.
And so that's how you can orchestrate a process within Una.
You can even schedule it to run on like a monthly or quarterly annual basis and kind of standardize some of your processes.
Related Articles
- Workflows — what workflows are and when to use one
- Scheduling and Triggers — running the workflow without clicking it
- Activities — the full catalogue of activities you can wire together