This is a 2 part issue:
How to move/delete a file after processing. Currently we can only copy, but the original file remains in the source. Ideally we don't want to add a separate process to get metadata and compare if processed or not. I have been following one blog that asks to use a WEB activity and the Delete Rest API. I have gotten to that point, but I am not able to understand/follow instructions on to obtain the ACCESS TOKEN. It shows Curl steps, if someone can help on this would be great.
I have created a pipeline, that has 4 Main activities. As part of this pipeline I want to be able to send email notifications for Success and failure.
Each success of an activity moves to the next activity, but if any activity fails it will send email. I Want to be able to have one SUCCESS or FAILURE Notification and dynamically add content to email instead of sending email on previous activity. For Failure it seems like I have to create a separate web activity for each activity to align a Failure, which is not elegant.
Based on how the WEB activity is set to use the logical apps for email, we have to define the activity name that the email is associated with (at least based on my understanding). So i created a separate WEB activity for each failure email, not very elegant.
Does anyone have a better way to handle.
enter image description here
enter image description here
The only alternative is using a logic app to delete blobs, you can trigger the logic app also via a Web activity. Can you share the blog URL for the delete via web?
As for the email on failure, the issue is that you cannot have 'or' dependencies in the pipeline. A workaround that I'm using is to introduce a variable, when an activity fails or when the pipeline is finished, it sets the variable. In parallel in the pipeline I have a while activity that checks this variable. When it gets a certain value an action will be triggered. Also not elegant, but you don't need a lot of Web activities this way.
Related
When I submit an Attachment to the Azure DevOps REST service (create), is there a place I can go to visualise all of the attachments in there? Or is my best course of action to just send a GET which will give me the list?
My problem then becomes...that there is no way for me to delete unwanted attachments.
Is there a place I can go to visualise all of the attachments in
there? Or is my best course of action to just send a GET which will
give me the list?
Yes, the best course of action to view these attachments is to send a GET request.
In fact, after you upload the attachments to a work item via the API, all of them are managed by the backend. The backend does not assign any relevant info to the work item. This leads to the situation where you cannot view them from the UI, unfortunately.
Microsoft hasn't expanded the API/SDK to provide an "attachment delete" call yet.
You can also press F12, then try with uploading and deleting attachments from one workitem within the UI.
As you can see, the attachments deleted are run by the backend via sending an event call. In your scenario, you cannot remove those unwanted attachments until now.
You are not the first one who has requested this feature. See this suggestion: Unable to delete/remove attachment from work item by using VSTS api. You can vote and comment there to raise its priority. The product team can then consider adding the feature to the roadmap.
In our design we have something of a paradox. We have a database of projects. Each project has a status. We have a REST api to change a project from “Ready” status to “Cleanup” status. Two things must happen.
update the status in the database
send out an email to the approvers
Currently RESTful api does 1, and if that is successful, do 2.
But sometimes the email fails to send. But since (1) is already committed, it is not possible to rollback.
I don't want to send the email prior to commit, because I want to make sure the commit is successful before sending the email.
I thought about undoing step 1, but that is very hard. The status change involves adding new records to the history table, so I need to delete them. And if another person make other changes concurrently, the undo might get messed up.
So what can I do? If (2) fails, should I return “200 OK” to the client?
Seems like the best option is to return “500 Server Error” with error message that says “The project status was changed. However, sending the email to the approvers failed. Please take appropriate action.”
Perhaps I should not try to do 1 + 2 in a single operation? But that just puts the burden on the client, which is worse!
Just some random thoughts:
You can have a notification sent status flag along with a datetime of submission. When an email is successful then it flips, if not then it stays. When changes are submitted then your code iterates through ALL unsent notifications and tries to send. No idea what backend db you are suing but I believe many have the functionality to send emails as well. You could have a scheduled Job (SQL Server Agent for MSSQL) that runs hourly and tries to send if the datetime of the submission is lapsed a certain amount or starts setting off alarms if it fails as well.
If ti is that insanely important then maybe you could integrate a third party service such as sendgrid to run as a backup sending mech. That of course would be more $$ though...
Traditionally I've always separated functions like this into a backend worker process that handles this kind of administrative tasking stuff across many different applications. Some notifications get sent out every morning. Some get sent out every 15 minutes. Some are weekly summaries. If I run into a crash and burn then I light up the event log and we are (lucky/unlucky) enough to have server monitoring tools that alert us on specified application events.
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
There are several instances where the values from a Zapier trigger need to be parsed or cleaned up before they can be used by a Zapier action. I can get halfway there by using Zapier code as an action but I don't see a way to turn around and have it also behave as a trigger.
As an example, say that I have a GMail trigger that I want to feed into my CRM system. The fields needed for the CRM system are contained in the body of the email. In this case I would want to send the email body to a Zapier code action to parse the values I need from the email body and add them as field to the output object. Next I need some way for the output to trigger the CRM action.
Does anyone know of a way to accomplish this?
Since asking this question, Zapier has released Multi-Step Zaps. This enables you to chain actions together. This is critical as they also provide a "Code" Zap that enables the developer to create javascript code that will take as input any of the fields of the previous zaps in the flow and can output virtually anything you want using Javascript.
I advancing learning about JBPM 5 and Drools flows. I have successfully setup a User Registration process and managed to run it as a web application. The process looks is shown below
You can check out the screenshot here [http://i.stack.imgur.com/y7JZ1.png]
What i want to do right now is, before reaching the User Task node where the user verifies his email, i need to send him a link in the Email task. The link must take the User TaskID (primary key), so that when the user clicks on the link, i can complete the task using the TaskID supplied in the URL.
My worry now is, the User task node is reached only after the email is sent. Therefore the Task is not yet created in the database. Is there any alternative way of doing this.
Or
If i can send a mail after reaching the User task, how can i get the primary key of the User Task??
Please help.
You should try with the onExit and onEntry extensions attached to the User Task node and remove the Email node. In that way as soon as the process reaches the Task Node you can get the work Item Id (something like the nodeId) that you can use to query the Human Task component to find the task associated with that node to complete it.
Cheers