Get the most out of the Enterprise Workflow Management
Last update: Fri Jan 26 2024 00:00:00 GMT+0000 (Coordinated Universal Time)
CREATED FOR:
- Intermediate
- Experienced
- Admin
- Leader
- User
In this session you will learn the benefits of using workflows for your assets management and how to quickly create them.
Chris Sofokleous Solutions Consultant, AEM / Adobe
Transcript
Please welcome to your screens, Chris Sophocles. Hello everybody. Lovely to be here today. My name is Christopher Sophocles. I’m a Solutions Consultant here at Adobe focused on AEM. And today we’re going to be having a look at how we can get the most out of our enterprise workflow management within Adobe Experience Manager. So before I kick off, you know, I think we’ve got lunch probably coming up after this. So I’d like to just quickly say how amazing all the sessions have been so far. You know, Chris Pillsworth and Robin for AEM and Bethann on Commerce. They’ve been awesome sessions that have been dipping in and out of as well. But now for the next 45 minutes or so, we’re going to look at how we can use workflows in AEM to start to automate processes that we want to do in both asset management, which is what we’re going to focus on today, but also all of our kind of content management tasks. Now, if anything like me, you will love things that are automated, right? I like to automate as many things in my life as possible, whether it’s at work, you know, creating Excel macros to do a task that probably only takes me about two minutes anyway, or in life, you know, I’ve got a Google Assistant in just about every room in my house to try and automate my life as much as possible. So let’s see if we can do the same thing here with our AEM work as well. So just to kind of level set here, of course, you know, we’re all familiar with AEM and what the purpose of AEM is, right? So we’re taking our content that we’re creating in the creative cloud or sourcing from Adobe stock, for example, all those assets and content, we’re bringing them into AEM where we’re going to bring it all together, orchestrate it, build our content, our experiences, and push those out to the end users and the end channels. So of course, a big part of the value of this kind of middle section where AEM sits is automation. And with that workflows, so automating repetitive tasks, automating tasks that might be time consuming to make sure that we can get the most value out of those assets that we bring into AEM in the first place. So what are workflows in AEM? So AEM workflows allow us to automate a series of steps that performed on one or more pages or assets. So that’s what, you know, experience league will tell us if we ask it, you know, what is a workflow in AEM? As I mentioned, it’s basically a way that we can automate on a mundane or repetitive or time consuming tasks within AEM. So what might be some examples of the kind of things that we could automate with workflows? So for example, we could create workflows to do kind of asset processing tasks or asset management tasks, whether that’s creating different renditions of assets, creating smart crops, doing things like applying metadata, checking that metadata is present, all those things, for example, we might be able to do that within a workflow. And also business processes. So a key example here might be review and approval. So where we want certain real life humans to have input within certain processes, whether it’s making decisions, signing off on assets or content, we can roll that into our workflows as well. So workflows at their core, you know, they’re quite simple. And what makes up a workflow? There’s a few different elements. So the first and I guess most important thing is here in the middle of the screen where we’ve got starts and our steps and our end. This is what we might refer to as our workflow model. So our workflow model is going to define all the different steps that we have in a workflow, what those steps do in which order we want them to take. And it’s going to define kind of the purpose of our workflow, if you like, and all the different steps within one of those models, of course, is the steps that we can take. And there’s a few different types of step which we might have. So, for example, we could have a step which would call another workflow. So I contain a step that’s going to kind of allow us to call a workflow from our workflow, we can have a process step, which is going to perform an action, whether that is making some changes to an asset or some metadata, or something like that. We have a participant step. So where we want a user to be notified of something, or we want a user to make a decision or choose between two things or approve a piece of content, we can have participant steps in there as well. We can even have branching so we can include logic in our workflows, you know, we could have AND or OR gates, so we could make sure that certain conditions are met before we move on to the next step of a workflow. And we can also have custom workflows, right? So in the same way that perhaps we could build core components, we can build these workflow steps as well. So we can write our own workflow steps in AEM, define a dialogue for those so that we can edit those in the UI as well. So lots of different types of step we can use. And we’re going to see some examples of all of these when we go kind of into the demonstration. But hopefully you’re starting to get an idea of maybe how powerful workflows really can be. So on the left hand side here, these are the two things that we need to feed into a workflow. So first, and I guess very importantly, is the payload, right? A lot of the time, our workflow is going to be applied to or in reference to a certain asset or certain piece of content. And that’s what we refer to in AEM in workflows as the payload. So the payload is going to be one of our inputs into the workflow. And another is going to be the launcher. So we can set up launchers and we’re going to see how we do that kind of in the demo portion of today’s session. We can set up launchers to automatically fire off workflows when certain conditions are met or when certain events happen. But of course, we can also fire off workflows manually, ad hoc, you know, from the AEM UI. And we can even do it over API. So we can use an API or use codes to fire off workflows in AEM. Maybe that’s something coming from Adobe IO or from an external system, we can actually fire those off if it’s part of a larger kind of automation process. So before we go into the demo, I just want to show here another kind of quick example. And this is what perhaps something with a participant step might look like. So we can define perhaps what user can approve or reject a certain asset or process. And we can have that logic applies to the workflow to only allow the workflow to continue if approved, for example. So now I’m going to go into a bit of a demonstration. And what we’re going to do here is we’re going to see firstly, how do we build a workflow? Right. So how can we build that workflow model? How can we build a launcher to automate it? And we’re going to do that kind of in real time and see how that’s done. Hopefully, you know, you’re about to maybe follow along or watch back on the recording and see how this is done. And then we’re going to have a look at an example of a workflow with a participant step involved and see what that looks like from a workflow point of view, kind of how we build that out. But also, when we initiate a workflow like that, what does that look like for the people who have to go in and review and approve those assets as part of that workflow, for example? So if I can just share my screen now, we’ll have a look at the AEM UI. So hopefully, you know, this screen is all too familiar to a lot of the people on the session today. And we’re going to start off by creating a workflow, just quite a simple example, just to see the steps that we have to go through to build that out. So we go into our tools here in AEM, and you see that there’s a whole section called workflow. And we’ve got a few different kind of menu items here to choose from. So as we kind of touched on before, of course, we’ve got our models. So we’ve got our workflow models where we’re going to define the definition of our workflows. We’ve got our launches that we kind of touched on before, which are our ways we’re going to automate the way that we trigger those workflows. But we’ve got a few other views here as well. And this is going to allow us to actually maybe troubleshoot, but also keep track of what our workflows are doing. So we’ve got our instances. So here we’ll be able to see any workflows that are currently running and what step they’re in. So perhaps if we see that a workflow has got stuck, maybe we’re waiting for someone to approve or a certain step has got stuck somewhere. We can see here all of our running workflows. We’ve got our archive. This is going to show us the history of all of our workflows that have run successfully so we can keep track of that. And also our failures. So if a workflow has failed for whatever reason, we can go into the failures for you, see that workflow and break it down step by step and see perhaps where along that process it failed and hopefully be able to understand why. But the first thing, of course, we’re going to do is have a look at our models and we’re going to create a workflow model here. So I’m going to create a new model and we’re going to create a workflow which is going to apply a watermark to a certain asset, for example. So I’m just going to do skill builders, apply watermark. Give it a name. And this is going to take us to the workflow editor. So what you’ll see as this loads up is the workflow editor is a very familiar UI to a lot of other things that we do in AEM. So it allows us to take all of our workflow steps here, maybe in place of where you would have components, if you like. We can drag them onto this kind of flow diagram here to build out the flow that we want to start using. So I’m just going to get rid of this kind of default step that goes in here so we can start completely fresh. And I’m going to start to bring in a few workflow steps. So you’ll see here that there’s quite a large number of workflow steps and a kind of workflow operations like OR and SPLIT that come out of the box with AEM. Now these are going to allow us to do a lot of basic asset and content management programs. And this is really powerful to get started with workflows. As I mentioned before, we can create our own custom workflow steps. So if you want to write your own code to be executed here as part of a workflow, we can absolutely do that as well. But to start off, I am going to go here and have a look at my steps. And I can see that I’ve got one here for applying a watermark. Here we go. So I’m going to drag that onto my flow and you can see it’s added here. Of course, we’ve only got one here at the moment. And similarly to kind of any other component in AEM, we’ve got a dialogue here where as a user, I can go in and set some data or some arguments for my workflow step. So just to think back to kind of if we were building a custom component, we’d of course build the code that we want to execute as part of that workflow step. But we’d also define a dialogue here as well in a similar way that we would do as we were building a component. So here I’m in the dialogue, of course, for this add watermark step. And we can see that there’s a title description which I can change by like. I can select whether I want to automatically advance after this step is finished. I do want that to happen in this case. And there’s a few arguments here for me as well. So I’m going to add in the text that I want to use. I can choose things like the kind of font and the size. I’m not going to change too many of these settings apart from I’m going to make it nice and big, set the color to be a nice dark color so we can hopefully see it nice and easily. And I’ll change the opacity as well. And you can see here that I can define those similarly to how we would use the dialogue in an AM component. And I can click add and that’s added back with all of my conflict. So first of all, in this kind of workflow that we’re building, we want to add the watermark. But to make sure that that shows in the latest rendition, we’re also going to want to perhaps reprocess that. So I’m just going to go down here and find the step that I want. Let’s see. Let’s see, where’s my process step? I don’t know why I can’t find it. How silly. So I’ll find my process step eventually, I’m sure. OK, I don’t know why that’s not coming up. But anyway, I’ll add a process step here. And that’s going to allow me to do this. Here we go. Let’s do it here at dynamic media, for example. And once we’ve done that, we can sync this example. So when we build this workflow model, it kind of lives in two places in AM, which is why the sync button exists. So let me quickly talk through that. So when we’re building the workflow model here in the UI, so we’re kind of saving and storing the design of this, this workflow. So it’s going to ask to come in here and make changes to it. And those changes won’t really take effect in the kind of runtime and execution of AM until we sync. So syncing it here will mean that it syncs my design here with my execution in AM itself. So now I’ve done that. Let’s have a look if we can run the workflow. So what I’m going to do is I’m going to go to my assets in AM. And here you can see I can go ahead and look at, for example, my skiing images. So here we’ve got a few examples here, and I’m going to create a new workflow. So I’m going to add this asset into a workflow, and I am going to choose my new, my new add watermark. And I’m going to apply that. And that’s going to apply the workflow. And then I’m just quickly going to do that processing step that for some reason I couldn’t find in my editor. So of course, I’m going to enter that workflow as well. And proceed. And what we should see is once we’ve done that, we’re going to see here that that watermark or not very pretty as it is in this example has been applied to our assets. Now, as I’ve done that, actually, I’ve just realized the mistake that I’ve made, right? So here are my design. I’ve got my kind of workflow steps here. But in fact, my workflow process isn’t a step. It’s a workflow. Silly me. So actually, what I need to do is introduce a container step. So as I mentioned earlier, as part of workflows, we can call other workflows from within them. And that’s what I needed to do here. So had a bit of a mind blank there. So I’m going to go ahead and do that. So let’s call this reprocess assets. And here we can give it a name and a description like before. And we can choose what sub workflow we want to apply. So here, as I was trying to find earlier, I’m going to apply my asset processing SDK on this workflow. So in my AM environment, that’s my kind of default reprocessing when I upload an asset to the dam. processing when I upload an asset to the dam. I just want to run that again after I’ve added the workflow. So if I just sync that quickly, go back here, and we’ll apply that workflow to a another example. This time, when we call our skill builder, apply watermark workflow, we’ll find that it does the watermark step, but also does that reprocessing step as well. So that’s automatically applied the watermark. So that’s kind of how a container step can be really powerful. And there, you know, my mind blank, I kind of forgot that it existed, right. So that’s kind of how we can use those. So if I use my models, and I look at what that processing looks like, we can see that that as part of this workflow that we just called within our workflow, there’s a large number of processes and calling to from one workflow triggering, we can kind of cascade down many steps for many workflows, as we see fit. And this can be hugely powerful, right for automating a lot of these processes. So right now, applying these workflows is kind of a manual task, right, I’m going on, I’m triggering the workflow here, applying them to individual assets. And that’s great, you know, that can save me a lot of time in this example of watermarking assets. But maybe we want to automate it further so that we don’t have to trigger that. And that’s where launches come in from, from an automation process. So if I go back to this tools UI in workflow, where before we were looking at the kind of models user interface, we’re now going to have a look at the launches. Now, as you can see, just like with workflow models, there’s a kind of wide set of launches which come out of the box, which we can use various different things. And a lot of them are used for the kind of default workflows that happen in a say, you know, the default processing that happens to assets, for example. But we want to create a new launcher for our watermark workflow to automate that process. So the first thing I have to select here is my event. So what do I want to actually trigger this workflow? So to start off with, I’ve got some options, so I can see if something is created, modified, or removed. And when I say something specifically, we’re talking about nodes in the content repository. So in this case, I’m going to choose creators. And here under nodes type, you can see that we can choose a wide range of nodes here within AEM. So we’re not just talking about things like assets and pages, but we can look at whether tags are added, whether tags are, for example, modified. We can look at whether workflows are being created. So yeah, so much stuff here straight from the content repository that we can monitor for either creation, deletion, or perhaps editing events as well. So for this example, we’re going to choose whether an asset has been created. We’re also going to choose the path. So you might want some launches, perhaps to be applied across the whole asset repository or to your whole website, for example, here for the weekend site. But actually what I want to do for this example is I want to create a specific landing zone in AEM where we can drop in our assets and they will be watermarked. So to do that, I’m going to choose a specific path. So here within my activities path, I’ve created a folder called watermarked, and we’re going to use this folder. So you can see that I can select that path. And then all I need to do now is choose what workflow model do I want to apply when this is triggered. So of course, in our example, we want to use the SB apply watermark workflow that we’ve just built right now. And the last thing that we want to do is in this case, I want to activate it straight away. We might want to create these launches and not have them active on AEM for whatever reason, but I want to activate mine straight away. So I’m going to choose that here. That’s here. And I can create the launcher. So if I try and have a look, we should be able to see that launcher here. So we’ve got our new launch that we’ve just created, and it’s going to apply that SB apply watermark. So let’s test it out. I’m going to go to my activities folder, and here I’ve got my watermarked folder, and I’ve got an asset that I prepared earlier. I’m just going to drag on to the screen. So I’m going to upload this asset, and it’s going to go through all of those normal processing steps that we’ve applied to it. But because it’s met that rule that it’s been created within this watermark folder, that extra workflow is going to be applied to apply that watermark automatically. So if we have a look at the preview for this image, we’re going to see that watermark has been automatically applied to the asset. Here we go. Perfect. So we can see that our watermark has been applied, and all we need to do in that case was upload the asset to a certain area. Awesome. So just before I transition onto the next stage, and we’re going to have a look in the next little part about how we can do a more participant-oriented approval or review step. I’m just going to pause for a second and just see, is there any questions in the chat that I should address? And I’m just going to have a look in the chat now and see. But hopefully that’s shown you how quick and easy it can be to build workflows. Clearly, we just quickly bought a two-step workflow there, so relatively straightforward, if you like. But very easily, we can build out much more complex workflows, calling upon other workflows, and even building in those custom workflow steps as well. So I don’t think there’s been any questions in the chat as far as I can see, but someone feel free to correct me if there has been. But in that case, what I’m going to do now is move on to the second part of the demonstration. So for this second part, we’re going to have a look at building a workflow in a kind of similar way, but this time with a participant step involved. So what does it look like to build that kind of approve and reject kind of style of workflow? How do we build those? And then also, how does that look for the approver for their kind of user experience as well? So if I can just quickly share my screen again, we’ll have a look at what that looks like. And here again, we’re going to have a look at our workflow models. And this time, I’m going to have a look at an example that I created yesterday ahead of this session. So you can see here that this is a workflow that I’ve named approve and publish. So this is going to be for assets or perhaps content. And we’re going to ask a certain user or a certain user group to give their approval or rejection on this asset. And you can see here that this looks a little bit more complicated, right? Because we’ve got some logic going on here as well. So let’s talk through step by step what’s happening here. And then we can have a look at what that looks like for the end user. So the first thing we’ve got here is a participant step. So we want the user to make a decision. So here, if I have a look in the dialogue of this step, you can I can give it a title, we want business approval, of course, for example. And I can choose the user or group that I want to make this approval make this decision. So here, I’ve just chosen the admin user, because that’s me in this case, I’m going to be making this decision as to whether approve or deny this object. Now, this could be a specific user, this could be a user group, so that anyone within a certain user group is either notified or has to make a decision as part of this step. And you can see here that I’ve also chosen to notify the user via email. So as long as we’ve got kind of an email service setup, it doesn’t have to be a notification within the AM user interface, we can also notify with a quick email as well. So I’ve decided that we want our business approver, which in this case is me, the administrator to make this decision. Now, what are their options going to be? What decisions do we want them to make? So in this case, I’ve chosen to use an or component, and this is going to allow me to define what options I want to give my business approver. So I’m going to give them the option to either approve the asset, which is going to activate it and publish it ready for use, or I’m going to choose to reject it. And in the case of reject, you can see that I’ve actually included another participant step. And what this is going to do is this is just going to in this case, send a notification to the content author, and they’re going to be able to see that this workflow has been passed back to them. And with any comments or anything that the business approver has made, will be fed back to them as well. So a nice simple flow, you can see again here that we could build kind of very complicated workflows for each of these options. We can have even nested logic here. You know, it’s quite a simple example here, but the UI is very simple to use to build out these workflows. And of course, with things like container steps to call other workflows, with all the kind of process that’s available to us, we can actually automate a lot of various different processes, whether it’s a business approval process or things like this, where we could have an approve and reject, and then have actual processing steps happen here as well. So again, as we did before, now that we’ve made these changes, the approve and publish workflow, here it’s saved as a design. So I can kind of leave and come back to this and see the design of this workflow. But I want to sync it now so that it syncs with our runtime model. So that when we go to actually initiate and run this workflow, it behaves with the most up-to-date design. So again, let’s go back into our assets. So I’m going to go here into my files and find an asset that I want to approve or reject for publishing. So actually in this case, let’s use our asset that we’ve just uploaded here to AEM. And as before, I’m just going to kick this off as a quick demo. I’m just going to kick this off manually. Again, we could do this in an automated way with a launcher, but for this example, I’m just going to do it like this. I’m going to choose my approve and publish workflow that we’ve just created and trigger that workflow. Now, what that’s going to do is because the participant within that participant step was me, the administrator, I’m going to see that I’ve got a notification here in AEM. And it’s for business approval. So I can select this. I can do something like delegate it. So I could delegate my decision to another member of the team if I’m a bit busy. But what I want to do in this case is view the payload. So I can see here that the payload is here, this image that I need to approve or reject. And here, I can view the content, for example. Now, you’ll see here in this timeline view that because this is currently in a workflow waiting for my decision, I have this button here, not only to remind me that this is in a workflow and it is for my decision to be made, but also it allows me to actually make my decision, make my action here within this view. So I could choose here whether I want to reject the content back to the author or whether I want to activate this asset. And I can do that from this user interface in a very quick way. But what I can also do is if I go back to the workflow itself, let’s have a look in the instances. I can see that I’ve got my workflow running and I can even make a decision here if I want to go back to my notifications and let’s say that I’m happy with what I’ve seen. I’m happy with that asset and I want to approve it. So I can complete my action. By action, I can approve it by activation and my comment. And send that off. Now, with my approval, it’s going to go through any of the following steps. Now, with my approval, it’s going to go through any of the following steps that were in that workflow. So in this case, that is just going to be to actually activate and publish that asset. So hopefully if we go through to here, we should see that now, whereas before we just had this editing symbol, we can see that this is now pending activation. Once the published server actually publishes and processes that out to where it needs to go. Now, again, if we go back to workflows, we can see that we just saw instances, all of our running workflows, we saw our launches. And let’s have a look at the archive because in the archive, we can see all of these different workflows and workflow steps that have taken place. So let’s have a look at our most recent one here, which was our approval. And I can see the history here as well. So I can see that it was created by the admin, which happens to be me, which was created three minutes ago. And then it was approved by the admin. Again, that’s me, but if it was a different user, I’d be able to see here who it was that gave that approval. And I can see any comments that have been attached to that workflow as well. So, you know, looks good to me. So that’s how we can kind of build a review and approval workflow in AEM. So again, you know, these aren’t necessarily two mutually exclusive types of workflow, right? We can combine the two. We can have review and approval as part of our asset processing. We can have asset processing as part of our review and approval. The point is that we can have human intervention where we need it to be, or where we want it to be for our business processes, but we don’t actually need that for our kind of straight automated processes. So if we want to have a launcher that fires, fires up a load of steps, and as long as there’s no errors, it sees it through to the end, and is a completely automated process, we can do that. And we can have those kind of participant interventions as well. So that kind of completes my demo for today. Hopefully you’ve seen that it can be really quick and easy to set up these workflows and set up these launchers to automate processes in AEM. And hopefully you can see how with the components and the kind of logic components that we have available to us out of the box, along with our custom kind of workflow steps that we can build, we can build hugely powerful workflows that influence kind of all kinds of things in AEM, things in metadata, things in tags, things in kind of asset and content itself, even down to on a node level within the AEM repository itself. So I’m going to pause now and go back to my slides and just see if there’s any questions in the chat. Hi, Chris. There’s no questions at this point. I know we’re almost at time, and if possible, in the next sort of 30, 40 seconds, would you be able to share any kind of key considerations or best practices when approaching and setting up workflows? Sure, absolutely. So I think one of the things that I would say is, if you want to build a big kind of complicated workflow, for example, your workflow that you want to be applied automatically every single time you upload an asset. You saw that in my example of that, it had lots of different steps. Now, a lot of those steps actually called out to other workflows, right? So I would say, where possible, keep your workflows to kind of one outcome, one piece of functionality. And if you need to pull in functionality from other workflows, do that. It avoids replicating functionality elsewhere, and you can kind of build these fragments of workflow instead of having lots of different workflows that kind of do basically the same thing, but slight variations. So that’s what I would say. Take advantage of container steps, call the workflows from your workflows. That way you can break down a big task into smaller workflows that are easier to manage, easier to maintain, and ultimately mean that you can create less kind of workflows to do the same thing. That would be my top tip to take away. Brilliant. Thanks, Chris. And you just about got that in time. Perfect. Thank you so much, everyone. Have a great rest of your day. Cheers.
recommendation-more-help
1b11e305-9ac1-4085-b79d-c0f5f0ae926b