I have a list called "Sessions", The list has a workflow which runs for item creation, modification. The workflow triggers when i add items using a web part as well as manually . I have developed a timer job which runs daily, which adds items to "Sessions" list. When timer job add items to the list, workflow does not trigger.
相关问题
- Which of these technology to use for BPM / Workflo
- How do you increase the number of processes in par
- Triggering a Prefect workflow externally
- Windows Workflow Foundation 4 (WF4) Delay
- SPWorkflowActivationProperties.Item is NULL in Sim
相关文章
- Forcing a TFS2010 workflow build to FAIL instead o
- Contributing using git
- Rehosted Microsoft Workflow Designer UI
- Workflow design advice for ASP.Net web application
- Git workflow for small web team
- Chef workflow for new cookbooks
- best way to versionize different git branches
- Undo local changes interactive
Creating or editing a list item using the API will not trigger workflows. You have to use the
SPWorkflowManager
class to trigger it yourself. Every instance ofSPSite
has a property of just that type, which is what you should use.You could code it like this:
Where
item
is the SPListItem which you have created/edited,association
is the instance ofSPWorkflowAssociation
that correlates the list to the actual workflow, andisAutoStart
is aboolean
variable telling the workflow manager whether the workflow trigger should behave as something that was started automatically (in your case,true
).