Designing a solution for automation
Do you want to automate your workflows with Linx, but you don't know where to start?
For steps on how to build a Solution that will include a Service event for automation, go here:
For an alternative explanation of what goes into the design of an automated workflow, let's turn things upside-down by starting at the end and working our way back from there.
Let's keep it simple: your desired end result is an automated workflow.
You may ask: what do I need and what do I have to do to put an automated workflow in place?
Well, you need a running Service event that will execute your workflow at specific times or under specific conditions.
Ok great, so what must I do to have a running Service event that will execute my workflow when I want it to?
That's a bit of a loaded question, or should I say, the answer is somewhat loaded. You must start your Service event, but for that to be possible you need a Solution that has been deployed to Linx Server that contains your Service event. In other words, you need a Service, inside a Solution on Linx Server... once your Solution that contains your Service event has been deployed to Linx Server, then you can start your Service event. (Keep connecting the dots - there are more to come.)
What must I do to have a deployed Solution on Linx Server that contains a Service event that will execute my workflow?
Short answer: you need a Solution.
Ok, but where do I get this Solution?
You have to design it. On Linx Designer. Then you can deploy it to Linx Server.
So let me guess: I need Linx Designer?
Yes. The Linx application consists of Linx Server and Linx Designer.
Ok, so I use Linx Designer to design my Solution that I will then deploy to Linx Server... but what goes into designing a Solution?
Well, remember your desired end result? You want an automated workflow. The automated workflow requires a Service event to be triggered and it needs a Process (your workflow) to execute when the Service event is triggered. That is essentially what you have to include in your Solution design.
Let's take it one step at a time ... the Service event: how do I add this to my Solution?
Services are contained in Plugins from where they can be added to your Solution. Ok, so your next question is probably going to be: where do these Plugins come from and how do I access them so that I can add my Service to my Solution? Linx come packaged with numerous Plugins that are available to be added to any Solution. Adding a Plugin to your Solution is as simple as clicking an Add button. Plugins can contain Services, as well as Functions and Types. Take the Timer service as an example: to add the Timer service to your Solution, first add the associated Plugin, which is the Utilities plugin, to your Solution, then drag and drop the Timer service from the Utilities plugin onto your design canvass to have it included in your Solution. Before you ask... the Timer service must be configured by setting specific properties that provide an indication of when the service event must execute. (As we go along, keep your desired end result in mind: automatic execution of your workflow at the times you want.)
Ok so now I know how to set up my Service, which means I know how to get my Solution's Service event to execute at the right times. How do I get my Solution to know what to execute though? Is that the Process you mentioned earlier?
How do I add a Process?
Easy. When you create a Solution in Linx Designer, a Process is created by default. You can use this Process, just rename it if required. You are also able to add additional processes, by adding them from the toolbar.
Ok cool, adding a Process is a no-brainer. It's more about what is included in the Process that is important, right?
That's correct. What makes a process work is what you add to it. You can add Functions and Types to a Process.
Where do these Functions and Types come from?
Hey, you should know this by now! Functions and Types are contained in Plugins, just like Services are contained in Plugins.
So similar to adding a Service by first adding a relevant Plugin that contains my required Service, I have to add a Plugin that contains my required Function or Type?
And after I have added the required Plugin, I drag and drop the Function or Type from the Plugin onto the design canvas to have it included in my Solution?
Yes... make sure you first select the required Process to which you want to add your Function or Type by clicking on the Process in the Solution Explorer, and then drag and drop the Function or Type onto the canvas.
Ah, ok I get you. So let's say I added a Function to my process, what else do I need to do?
Just like with setting up a Service, you have to set the relevant properties associated with your Function, so that your Function will execute correctly.
Ok, so after I have designed my Process to reflect my workflow requirements, what do I do next?
Three things: firstly, you have to make the connection between your Service and your Process, so that when your Service event is triggered, it not only knows when to trigger but also what to trigger for execution.
That sounds complicated...
Not at all! You simply select your Service event by clicking on it in the Solution Explorer section, then you drag and drop your Process from the Solution Explorer section onto the canvas, which then links your process to your Service event. Voila!
Ok, so how do I know that my Solution will actually work?
That's the second thing you still have to do: debug your Process, so that you can either see what is failing in your process design and setup, or you can confirm the successful execution of it. If your Process is failing, take note of the debug output values, and go back to your Process to fix the problems. Then debug again, until everything is working as expected.
Let me guess what the last step is... I can now deploy my Solution to Linx Server, right?
To close the loop, let's go back to where the discussion started: after your Solution is deployed to Linx Server, what do you have to do next?
I have to to start my Service event to finalise the implementation of my automated workflow.
This explanation is a slightly simplified version of what is possible, especially in terms of Processes: yes, it is true that a Process contains plugin-related Functions and Types, but in addition to these, a Process can also use Custom Types. A Custom Type can be used to create a complex type with one or more properties. Properties can in turn be of any Type (e.g. string, boolean, integer, etc) or even another Custom Type.
Don't delay: automate your workflows with Linx for increased business efficiency.