Sharepoint Workflow doesn't trigger after created/edited tickets - sharepoint

I have a workflow created in Sharepoint designer that works fine when manually triggered. I want it to trigger when a new ticket is created and when an existing ticket is edited. I have tried everything, but it makes no sense that it works when manually triggered, but does not appear to trigger when tickets are created/modified. Any help would be appreciated.

While creating a work flow (first screen) you can see three check boxes
Allow this workflow to be manually started from an item.
Automatically start this workflow when a new item is created.
Automatically start this workflow when ever an item is changed.
You might have choosen the first option only. So that you need to start it manually. You have to opt the three options
also what do you mean "I have tried everything".

Related

Link to start my workflow doesn't appear on my list

I have already create my workflow on SharePoint designer and publish it to my SharePoint library so the Column which has the workflow name was added but the link to start my workflow(has the name of my first step) doesn't appear.
You question is a bit vague but the column in the list simply shows the status of the workflow. To kick off the workflow manually, you need to go to the library and select the item you want to kick the workflow off for. In the ribbon, there is an option to go to workflow settings and in that page you will have the option to start the workflow. If you have correctly built the workflow this should run it. You left important information out of your request such as what version of SharePoint, what triggers your workflow, etc.. so this is the best I can do with that. If that does not solve the issue, I would suggest providing more information. Not many people will take any time to do guess work.

Set custom Workflow to run daily in CRM 2013

I have written a custom work flow which is registered on account entity . I want this workflow to run daily to create tasks. the workflow works fine when i register it on record created . but it does not trigger when i schedule it for every day. like after 24 hours it should trigger automatically by itself
any one can help plz
Two workflows:
Parent who runs on creation and triggers child.
Recursive child who triggers the custom workflow activity.
Parent workflow definition.
Child workflow definition. Extra validation step added to stop scheduled process on condition. Needs to be updated to your needs, of course. Status can be set to Cancelled for clarity.
Notice that the timeout is after the initial execution. This is by design to allow the custom activity workflow to run as soon as the child workflow is triggered by the parent workflow.
As an alternate answer to what #denious is offering, you can use the CRM Workflow Automation Tool. It works on both CRM 2011 and 2013.
This works different in the sense that it does not use Workflow timeouts to accomplish a daily run, rather you set it up as a Windows Scheduled Task (likely on your CRM server) and have it run everyday at a set time.
Setup is minimal and the tool allows you to specify a FetchXML query to retrieve the appropriate records and then a Workflow to execute against the returned records.
A few nice things about this approach:
You can schedule all the tasks to run at the same time (for example 6 AM daily) as opposed to it being run based on whatever time the workflow was originally initiated.
Once the workflow is run there are no lingering workflow instances just running a timeout.
No need for a parent/child workflow setup. You just need a single workflow which does the respective action.
Because it runs on the Windows Task Scheduler you can do things like omit running on weekends where you cannot do this on CRM (without additional tools/rules).
Ultimately, both will accomplish the same thing but this is just another option to consider.
Solved it after spending a week in it...
you should first start it manually by going in a record of the primary entity on which you have added your custom workflow
follow the steps below.
1) Register required steps
2) select record of the entity
3) click on the three ellipses button shown on the ribbon of CRM.
4) click on run workflow
Example
let' say my primary entity is account on which my workflow runs.
1)go to account entity
2)select a record
3)click on the three ellipses button on shown above on ribbon for every selected record
4)click run workflow
5)done

SharePoint workflows cannot automatically start

I'm trying to make a SharePoint workflow start automatically for any new document that is uploaded to a specific doc library. I've configured the workflow in SharePoint Designer to auto start for new documents or changed documents. However, the workflow never starts automatically! I can run it manually, but it won't execute itself.
I've searched around and have found the core issue, which is reflected in my log:
"Declarative workflows cannot automatically start if the triggering action was performed by System Account. Canceling workflow auto-start."
However, all the fixes I've seen have not worked for me. A common solution is to not run or create the workflow as the SharePoint System Account. Well, my SharePoint service accounts are not the ones I'm logging in as to upload my documents nor was it the one I used to create the workflow. I've tried editing & re-publishing my workflow as a totally new account and it still won't auto-start.
Just focus on two things:
Workflow will never start automatically with system account.
Check the options Start workflow automatically when an item is created or changed from Workflow Start Options.
While publishing the workflow, u need to select the checkbox Start workflow automatically when an item is created or changed for the workflow to start automatically or else whatsoever the WF will not start automatically.
Instead of using Sharepoint system user account, u could use an account having contribute permission on site level and full control over the library
Run the command at the server in powershell
stsadm.exe –o setproperty –propertyname declarativeworkflowautostartonemailenabled –propertyvalue yes
After I did that, the workflow runs perfectly although it shows the created by as being "system account".

SharePoint - Scheduled Workflows

Is there any 'out of the box' feature in SharePoint to allow you to schedule a workflow?
No there is no OTB feature to do that, but depending on the workflow you might be able to fake it.
If it's a SharePoint Designer workflow you've created that you want to run at certain intervals. Then you can make the following changes to it:
Make it run automatically when the
item is changed.
When it's done with the real
functionality then make a delay and
after the delay modify the item and
stop.
A new instance of the workflow will then spawn due to the modification

Sharepoint Workflow Fails When First Run But Succeeds When Run Manually

We are using an infopath form that when submitted is supposed to fire off a custom .NET workflow. Basically, the information within the form is used to create a new sharepoint site. What I am seeing happen is that the first time the workflow runs (which is automatic after the form is submitted), the workflow errors out. When I run the workflow manually immediately after it fails, the workflow runs fine.
this.workflowProperties.Item["Client Name"]
I've debugged the issue down to the above line where workflowProperties is of type Microsoft.SharePoint.Workflow.SPWorkflowActivationProperties. The first time the workflow runs, the property listed above (and all others) are null. The second time it is run the client name property is as it should be (populated from the infopath form).
Another important piece of information is that this workflow was working fine for over a year and suddenly started not working correctly a few weeks ago for no particular reason. We were having some permissions issues the past month but I cannot see how that could be related to the workflow issue. The user I am logged in as is a site collection administrator. I use the same user to kick the workflow off manually (which succeeds). I do not think that the workflow runs as the user that is logged in though (when it is run automatically on form submission).
Another interesting wrinkle to the whole situation: there are a total of 3 custom workflows that the application uses. 2 were made in visual studio - one of these works fine and other is displaying the behavior described above. The last was made in sharepoint designer and is failing.
I'm willing to try just about anything at this point. I am on a dev server (which displays the exact symptoms as production) so I can try just about anything.
I'm guessing this has to do with the workflow being fired asynchronously from the commit operation that sets the fields values. Can you try and fetch the item explictly from the list instead of using the Item from the workflow properties. something like the following:
SPListItem l_item =
workflowProperties.Item.List.Items.GetItemById(
workflowProperties.Item.Id
);
i'm not certain, but it may be worth a try.
The other thing to keep in mind is the SPContext.Current object will be null if being called from an EventReceiver, but will be valid if called manually. It doesn't sound like this is the issue, but its something to be aware of nonetheless.
If the InfoPath forms are submitted from a Vista or Win 7 machine, you might face this issue of getting a NULL value for the fields in the InfoPath form. Try adding a delay activity with around 10seconds and see if your are able to get the value of the fields from InfoPath.
Refer to this link for more details: Why does my SharePoint workflow fail when the client is running Vista or Windows 7?
Try looking in your SharePoint Logs.
They are located under the 12-Hive in the LOGS folder - open up the latest and look for something with 'Workflow infrastructure' in it, maybe that can point you in the right direction.
The "solution" was to do an export and transfer to a new server. Basically just use STSADM to do the export operation and then import the same file on the new server.
SEE:
http://sharepointdogs.wordpress.com/2008/07/30/content-migration-or-backuprestore-in-moss-2007/
I was on the phone with Microsoft Support for hours on this issue - transferring to a new server would be my recommendation for anyone else that might encounter this problem.

Resources