Showing posts with label Work Flow. Show all posts
Showing posts with label Work Flow. Show all posts

Thursday, 11 July 2013

sharepoint designer workflow email link to list

Most of the workflow end users requirement is, there should be a link to review the workflow item in  their email.
I am just sharing a quick tip to send an email to a sharepoint Item by adding hyperlink to the message body

1.       Add a “Send an Email” action to your workflow. Edit the action to pull up the email configuration dialog.
2.       Select the text and click the “Add hyperlink” button seen below.
When prompted for the address of the link click the string builder button to add the URL

  3.   In SharePoint, go to the form library where your InfoPath forms are stored, and click an existing  InfoPath form to open it in the browser.
  4.   Copy the URL of the InfoPath form. The URL could resemble the following:

http://ServerName/SiteName/_layouts/FormServer.aspx?XmlLocation=/SiteName/LibraryName/Form1.xml&Source=http%3A%2F%2FServerName%2FSiteName%2FLibraryName%2FForms%2FAllItems%2Easpx&DefaultItemOpen=1
 
where ServerName is the name of the SharePoint server, SiteName is the name of the SharePoint site, LibraryName is the name of the SharePoint form library, and Form1.xml is the name of an InfoPath form 
Copy the URL and paste in the string builder window .Remove the shaded portion after
http://ServerName/SiteName/_layouts/FormServer.aspx?XmlLocation=
 
Instead of that add a lookup [%Current Item:Encoded absolute URL%]  as shown below

5. click OK and publish workflow

Now whenever you create a new InfoPath form and save it to the form library, the SharePoint Designer workflow is started, and an email is sent to the recipients you specified for the email in the SharePoint workflow. When a user opens the email and clicks on the link in the email, the InfoPath form opens in the browser.

Thursday, 7 March 2013

"Related Content" link in work flow Task form does not open in browser

Below is the step by step procedure for solving the issue

1.Open C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\template\layouts.
2. Locate the WrkTaskIP.aspx.  Make a copy of the file and Open in sharepoint designer.
3.  Locate the line SPHttpUtility.NoEncode(m_pageDescription,Response.Output); remove this and add below code 
<%
if(m_pageDescription.Contains(".xml"))
{
//Forcing any xml items to open with forms services
SPHttpUtility.NoEncode(m_pageDescription.Replace("http",SPContext.Current.Web.Url+"/_layouts/FormServer.aspx?DefaultItemOpen=1&ClientInstalled=true&Options=DisableSave&XmlLocation=http"),Response.Output);
}
else

SPHttpUtility.NoEncode(m_pageDescription,Response.Output);
}
%>
4. Do save

 hope this helps..

Application Server Administration job failed for service instance. Event ID 6482

There were many issues that require you to clear the share point configuration cache on your servers.

Below is the step by step provided by Microsoft for Clearing Configuration Cache
1. Stop the Windows SharePoint Services Timer service (Found in Windows Services)
2. Navigate to the cache folder
Drive:\ProgramData\Microsoft\SharePoint\Config\<GUID>
There may be more than one  GUID folders
3. Locate the folder that has the file "Cache.ini"
4. Back up the Cache.ini file.
5. Delete all the XML configuration files in the GUID folder
Note : make sure that you do not delete the GUID folder and the Cache.ini file that is located in the GUID folder.
6. Open Cache.ini file in Note Pad, click Select All and Delete. Type 1, and then Save. Close the Note Pad.
7. Start the Windows SharePoint Services Timer service
8. Restart IIS
Make sure that the Cache.ini file in the GUID folder now contains its previous value, not 1.

Work Flow is not updated. Showing as cancelled in work flow column

Sometimes this situation may happen, you are making changes to your SPD workflow and they are not reflected on the list/doc library where the workflow is deployed.

reason is that, SPD will use the cahced information from a location such as the following:

%System Drive%\%user%\Local\AppData\Microsoft\WebSiteCache

Here you will find a folder named similar to your SharePoint site on which you are working.

Delete this folder and restart SharePoint Designer and IIS. Make any changes to your workflow and that should be reflected onto your list/library.

Thursday, 28 February 2013

Difference B/W Sequential Workflow and State Machine Workflow

Sequential Workflow:
- It looks very simple like flow chart.
- Steps within the workflow execute sequentially, one after another in the particular order.
- A sequential workflow always progresses forward, never going back to a previous step.
- Sequential workflows are definitely much easier to design and maintain.

State machine Workflow:
- A state machine workflow executes in no particular order and these are based on events like OnTaskCreated, OnTaskDeleted etc.
- A state machine workflow moves from one state to another until the logic concludes the workflow has completed.
- Compared to Sequential workflows State machine workflows are difficult to design and maintain.
- In order to move to another event, the workflow needs to meet another state.
- The workflow doesn’t really have to end. It can stay in the same state for weeks.
Visual studio provides both Sequential workflow and State Machine workflow. But in SharePoint designer you can only make sequential workflows.

There are some business process that requires a state machine workflow like for example: a bug tracking system where When the workflow first starts, the bug may be placed in a Pending state, where it waits for a developer to be assigned and start working on the bug. When the developer starts working on the bug and fixes it, the bug is put into a Fixed state. When the bug is fixed, a tester confirms the resolution of the bug. If it is not fixed, he places the bug back in a Pending state.
So you should decide the type before developing the workflow. Because it will be very difficult to change once you have started that workflow.

Sequential workflow should used when there is only one way to complete a task and the workflow controls the process. But state machine workflow can stay in a same step for a longer period of time, must not be in an end state. State machine does not have any specified path, they are event driven.