Currently, I'm developing a SPOnline workflow trying to automatically assign a task monthly, quarterly, or yearly based on a drop down box value. From what I've been testing, the pause for duration, set at 5 minutes, seems to hang and does not resume the workflow after pausing. I have tried removing the pause for duration action and have had a successful task assignment. Heres how it flows currently with the problem:
Step / Action
1 / Workflow Initialized
2 / Determine Month/Qtr/Year based on drop down list
3 / Pause based DDL value (This is where it hangs)
4 / Set document approval status to Pending
5 / Assign a task
6 / Set document approval status to Completed
No matter what time interval I set it to, it seems to hang and not complete the workflow or go to the next task. I've tried the following steps:
• Debugging the workflow by removing pause for duration step
• Changed regional settings to match server
• Broken up workflow actions into multiple steps and vice versa (seeing if pause needs to be seperated out)
• tried 5,10,15,30 min and 1 hour pauses
Any suggestions on what to look at or if Pause for Duration is not working properly? Thanks!!
There was a hotfix to address a problem with the "pause for duration" actions not firing. However, I think this was rolled into SP1, so you should have that applied already:
Hot fix blog entry
http://www.microsoft.com/downloads/details.aspx?FamilyId=256CE3C3-6A42-4953-8E1B-E0BF27FD465B&displaylang=en
FWIW, I'm getting the same behavior with SP2 installed. Several "Pause for Duration" WFAs which should have paused for 3 minutes each have now been waiting for more than 4 days with no error in the workflow, and all timer jobs reporting healthy in central admin.
There's a post about this on MSDN which suggests that the hotfix only fixed part of the problem: http://social.msdn.microsoft.com/Forums/en-US/sharepointworkflow/thread/1965d387-8436-4868-98dc-7a76cbda75d3/ (that discussion has been locked, thanks MSDN)
Related
Im creating a workflow for approvals using power automate. I also have this reminder system set up to remind them every hour for 4 times and then once a day afterwards. This works when I have a parallel task set up, but for this specific loop in the approval, im using apply to each since i can add as many people to review myd ocument as I want. I notice that I can't reset the delay action while its active because it is still running. The only way it gets reset is that the delay action is finished and starts the loop again and then the variable gets reset.
This works if the loop isnt inside an apply to each and the reminder system works as well.
enter image description here
A useful feature of application monitoring services is sending alerts (e.g. emails) each time a new, unique error/problem/exception occurs (i.e., not for each occurrence). Either only the very first time, or at most once per X time (a day or week or such). This is, for example, possible with Visual Studio App Center. Unfortunately I haven't been able to find any such feature in Application Insights.
For clarification, a "new, unique error/problem/exception" can be thought of as a specific log statement in the code. I'm using Serilog, so all logged traces/exceptions have a MessageTemplate property which may help. But ideally the "problem ID" would be based on the code location, too (since multiple log statements may use the same message template).
The best lead I have found is the ability to send alerts based on a custom analytics query, but I'm not sure if it's possible to write a query that can give a behaviour similar to (if not exactly like) to what I describe above.
Is something similar to the behaviour I describe above possible to achieve with Application Insights? If it's possible through a custom query, how might such a query look?
Just through UI of azure portal, it's hard or impossible to achieve your first requirement: alert only the very first time. But you can try to use app insights rest api to fetch the data, then use code to implement your logic.
There is a similar solution(not exactly like you describe) for alert once per X time. The steps are as below:
1.Nav to azure portal -> you application insights -> Alerts -> new alert rule -> in the Condition, click Add button -> then select "Custom Log Search"
2.In the "search query" textbox, write your query like below:
exceptions
| where xxxx
Note that in the where clause, use some properties to identify the unique error.
3.Then in the "Alert logic", use the following settings:
Based on: Number of results, Operator: Greater than, Threshold value: 0
4.In the "Evaluated based on", set proper value for Period(max value is 2880 minutes) / Frequency(max value is 1440 minutes).
So if you want to trigger alert 1 time per day, you can set Period to 1440 minutes, set Frequency to 1440 minutes. But you also need to note that, if in the next day, there is no such specified error, it will not trigger in the next day.
I am baffled! This used to work. I have a very simple Alert that triggers a very simple Action Group. The alert query is:
exceptions | where timestamp >= ago(6m) | order by timestamp desc
In the App Insights Logs I can see that there are exceptions.
In the Alert screen, in Configure Signal Logic I can see that there are exception. In my mind that means that the Alert should be triggered.
However the Action Group which is just a "Send Email" doesn't seem to be executed since I do not receive the email.
In Monitor Alerts / All Alerts I do not see any alert.
Any idea of how to investigate to see what is going wrong?
Wow, the Azure alerting system wasn't working (100%) yesterday!! I left the alerts enabled over night and they starting firing at 3:41 AM PST. Checking the Azure Status website, it doesn't say anything about this.
These were new alerts that I created yesterday. I have other alerts created a while ago and they were firing.
It seems that the new alerts weren't picked up yesterday.
Here are some instructions you can follow:
make sure you select application insights as target
check the time period / frequency / threshold during create alert rule -> add condition:
For example, if you set the time period as "over last 30 minutes", frequency as "every 5 minutes", threshold as "total number greater than 2".
Let's assume that this alert will check condition from 2:00 to 2:30(time period), and every 5 minutes(frequency) like from 2:00 - 2:05, if during 2:00-2:05 the total number of exception is more than 2, this will trigger alert, and send you an email.
If during every 5 minutes, total number of exceptions is less than 2, no alert will be triggered.
Hope it helps.
we have a requirement to delete items from a SP list if they were not modified for 15 minutes.
I configured a simple workflow in SP Designer and assigned it to a change action that pauses for 15 minutes and then deletes the item.
Now, if the item changed while the original workflow is paused, a new workflow will be started (I presume) with a new counter.
But how to terminate the original workflow so that it wouldn't delete the item earlier?
We are on SP2013 on Office365.
Thanks,
I think you can solve it other way.
Use SP 2013 workflow platform, and set the trigger to item creation.
create a date/time variable and set to current date or modified field value
pause wf for 15 minutes
if currentItem:Modified less then or equal your variable stored time
if yes: delete item
in transition to stage section use the 3. step again and if yes: select end the workflow, if no: go to stage one
Only way I can think of is to make the workflow run a Powershell script that has the rights to stop workflows. But keeping track of the workflow instance id and the item is going to be a hazzle.
How about simply putting a check at the end of the workflow that checks if the last modified field is older than 15 minutes. If it is older then delete the item, if it is not then terminate that workflow without action.
Since I don't see the option in schedule properties of an agent, I was wondering if it's possible to run an agent once every 3/6 months, or even every year?
I only see -more than once daily,daily,weekly,monthly,never..
Pick the closest option in schedule properties, eg monthly, and then add code at the beginning of your agent that checks the date and depending on the result either exits without doing anything, or continues running the main body of the code. Works fine with agents written in lotusscript, never tried it with #formula.