Skip to content

Instantly share code, notes, and snippets.

@owns
Last active July 30, 2018 07:10
Show Gist options
  • Save owns/b0f9a3abd3880e06079159c2596bbb6e to your computer and use it in GitHub Desktop.
Save owns/b0f9a3abd3880e06079159c2596bbb6e to your computer and use it in GitHub Desktop.
Blue Prism Object - Interact with SharePoint using CSOM
<process name="SharePoint CSOM" version="1.0" bpversion="6.1.0.992" narrative="interact with SharePoint using CSOM" type="object" runmode="Background" preferredid="dd74132c-8cd8-456a-9fa0-b6a370c01871">
<appdef>
<element name="Application Root">
<id>4931ccac-96a9-4d14-b12e-bdb23f0c3270</id>
<type>Application</type>
<basetype>Application</basetype>
<datatype>unknown</datatype>
<diagnose>False</diagnose>
</element>
</appdef>
<view>
<camerax>58</camerax>
<cameray>-77</cameray>
<zoom version="2">1.25</zoom>
</view>
<preconditions />
<endpoint narrative="" />
<subsheet subsheetid="c24fd0a0-95ed-4259-9af2-8c223123f54b" type="CleanUp" published="True">
<name>Clean Up</name>
<view>
<camerax>-52</camerax>
<cameray>8</cameray>
<zoom version="2">1.25</zoom>
</view>
</subsheet>
<subsheet subsheetid="b3a13010-3579-4fec-9263-e6b4a8978ee3" type="Normal" published="False">
<name>Init</name>
<view>
<camerax>0</camerax>
<cameray>0</cameray>
<zoom version="2">1.25</zoom>
</view>
</subsheet>
<subsheet subsheetid="13ea01fb-3d78-45c7-a9c6-02c57acb36a2" type="Normal" published="True">
<name>Dispose</name>
<view>
<camerax>-16</camerax>
<cameray>0</cameray>
<zoom version="2">1.25</zoom>
</view>
</subsheet>
<subsheet subsheetid="a60e8698-10cf-4250-99cd-7502a41b8269" type="Normal" published="True">
<name>SetDebug</name>
<view>
<camerax>0</camerax>
<cameray>0</cameray>
<zoom version="2">1.25</zoom>
</view>
</subsheet>
<subsheet subsheetid="2a3e1401-a8c5-466e-b212-8dd69c5d8598" type="Normal" published="True">
<name>SetValueSeparator</name>
<view>
<camerax>0</camerax>
<cameray>-21</cameray>
<zoom version="2">1.25</zoom>
</view>
</subsheet>
<subsheet subsheetid="0ca05069-89d3-422f-b15e-ae94b473aed8" type="Normal" published="True">
<name>GetElapsedMilliseconds</name>
<view>
<camerax>0</camerax>
<cameray>0</cameray>
<zoom version="2">1.25</zoom>
</view>
</subsheet>
<subsheet subsheetid="9c323c5b-a1a8-4436-8283-a21b2323687f" type="Normal" published="False">
<name>TryExecute</name>
<view>
<camerax>122</camerax>
<cameray>-42</cameray>
<zoom version="2">1.25</zoom>
</view>
</subsheet>
<subsheet subsheetid="8abede7e-97d7-4b0b-9789-c05efc93e747" type="Normal" published="True">
<name>Sign In</name>
<view>
<camerax>12</camerax>
<cameray>-72</cameray>
<zoom version="2">1.25</zoom>
</view>
</subsheet>
<subsheet subsheetid="0a5dffc6-e6ba-4ba3-ac44-f30fbd883985" type="Normal" published="True">
<name>GetItems</name>
<view>
<camerax>45</camerax>
<cameray>56</cameray>
<zoom version="2">1.25</zoom>
</view>
</subsheet>
<subsheet subsheetid="e2236adf-cf27-4590-a6bc-bcaaabb74e43" type="Normal" published="True">
<name>UpdateItem</name>
<view>
<camerax>93</camerax>
<cameray>71</cameray>
<zoom version="2">1.25</zoom>
</view>
</subsheet>
<subsheet subsheetid="42fe214f-9024-4732-bf44-0f2fa58c322c" type="Normal" published="True">
<name>DownloadFile</name>
<view>
<camerax>67</camerax>
<cameray>21</cameray>
<zoom version="2">1.25</zoom>
</view>
</subsheet>
<stage stageid="480edcbd-60ba-4190-9897-1be0e905de16" name="Start" type="Start">
<loginhibit />
<narrative>
</narrative>
<displayx>0</displayx>
<displayy>-135</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<onsuccess>59dd7909-19b7-4518-ab4c-79ad5f207719</onsuccess>
</stage>
<stage stageid="56fd6584-ab82-4623-a18c-ca5eb89b3322" name="Stage1" type="ProcessInfo">
<narrative>
</narrative>
<displayx>-45</displayx>
<displayy>-195</displayy>
<displaywidth>150</displaywidth>
<displayheight>60</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<references>
<reference>System.dll</reference>
<reference>System.Data.dll</reference>
<reference>System.Xml.dll</reference>
<reference>System.Drawing.dll</reference>
<reference>System.Windows.Forms.dll</reference>
<reference>System.Core.dll</reference>
<reference>\\one.ofc.loc\dfsusa\SharedData\STL01\BSC\STL-Project\DevCell Team\Source Code\Shared\SharePoint\2013\Microsoft.SharePoint.Client.Runtime.dll</reference>
<reference>\\one.ofc.loc\dfsusa\SharedData\STL01\BSC\STL-Project\DevCell Team\Source Code\Shared\SharePoint\2013\Microsoft.SharePoint.Client.dll</reference>
<reference>System.Data.DataSetExtensions.dll</reference>
</references>
<imports>
<import>System</import>
<import>System.Drawing</import>
<import>System.Data</import>
<import>System.Windows.Forms</import>
<import>Microsoft.SharePoint.Client</import>
<import>System.Security</import>
<import>System.Collections.Generic</import>
<import>System.Linq.Expressions</import>
<import>System.Linq</import>
</imports>
<language>csharp</language>
<globalcode><![CDATA[]]></globalcode>
<code><![CDATA[private ClientContext SPCtx = null;
private List<object> SPItems = new List<object>();
private System.Diagnostics.Stopwatch SPSW = new System.Diagnostics.Stopwatch();
// ---------------------------------------
// string[] to Func<ListItem,object>[]!
// ---------------------------------------
private static Expression<Func<ListItem, object>>[] CreateListItemLoadExpressions(params string[] viewFields)
{
var expressions = new List<Expression<Func<ListItem, object>>>();
// add id lookup
Expression<Func<ListItem, object>> idExpression = i => i.Id;
expressions.Add(idExpression);
// for each fields passed, add it!
foreach (string fieldName in viewFields)
{
string intFieldName = fieldName;
Expression<Func<ListItem, object>> fieldExpression = i => i[intFieldName];
expressions.Add(fieldExpression);
}
return expressions.ToArray();
}
// ---------------------------------------
// SharePoint ListItems To DataTable
// ---------------------------------------
private static DataTable ListItemsToDataTable(
ListItemCollection listItems, string[] fields,
string valSeparator = "|")
{
var dt = new DataTable()
{
Columns = { new DataColumn("Id", typeof(int)) }
};
var colAdded = false;
foreach (ListItem i in listItems)
{
// add columns
if (!colAdded)
{
colAdded = true;
foreach (string f in fields)
{
var t = i[f].GetType();
if (t.IsArray ||
t == typeof(FieldUserValue) ||
t == typeof(FieldLookupValue))
t = typeof(string);
dt.Columns.Add(f, t);
}
}
// add a new row
var dr = dt.NewRow();
dr[0] = i.Id;
foreach (string f in fields)
{
var o = i[f];
dr[f] = SPToBPType(o, valSeparator);
}
dt.Rows.Add(dr);
}
return dt;
}
private static string SPArrayToString<T>(T[] l, string valSep)
{
return string.Join(valSep, l.Select(o => SPToBPType(o, valSep) as string));
}
private static object SPToBPType<T>(T o, string valSep)
{
if (o == null) return o;
var t = o.GetType();
if (t.IsArray)
return SPArrayToString(o as object[], valSep);
if (t == typeof(FieldUserValue))
return (o as FieldUserValue).LookupValue;
if (t == typeof(FieldLookupValue))
return (o as FieldLookupValue).LookupValue;
return o;
}
// ---------------------------------------
// DataTable to String - useful for debugging
// ---------------------------------------
private static string DataTableToString(DataTable dt, int rows = 3)
{
// add columns
var body = new System.Text.StringBuilder();
for (int i = 0; i < dt.Columns.Count; i++)
body.Append("|" + dt.Columns[i].ColumnName);
body.AppendLine();
// add rows
var maxRows = Math.Min(rows,dt.Rows.Count);
for (int i = 0; i < maxRows; i++)
body.AppendLine(string.Join("|",
dt.Rows[i].ItemArray.Select(o => o.ToString())));
// add ... if not all rows
if (dt.Rows.Count > maxRows) body.Append("...");
// return as string, removing first |
return body.ToString(1, body.Length - 1);
}]]></code>
</stage>
<stage stageid="d84d6655-4454-409d-a47d-155e26f2efd1" name="Clean Up" type="SubSheetInfo">
<subsheetid>c24fd0a0-95ed-4259-9af2-8c223123f54b</subsheetid>
<narrative>ClientContext is Disposible, so dispose if it...</narrative>
<displayx>-105</displayx>
<displayy>-195</displayy>
<displaywidth>120</displaywidth>
<displayheight>60</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
</stage>
<stage stageid="0b6f0515-366e-4e09-aba6-8811bbc388ef" name="Start" type="Start">
<subsheetid>c24fd0a0-95ed-4259-9af2-8c223123f54b</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-75</displayx>
<displayy>-135</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<onsuccess>753a8e83-97c1-4526-aeb2-a8c037657e55</onsuccess>
</stage>
<stage stageid="27fb8779-4cc4-429a-862f-aa5c242f7b76" name="End" type="End">
<subsheetid>c24fd0a0-95ed-4259-9af2-8c223123f54b</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-75</displayx>
<displayy>-45</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
</stage>
<stage stageid="19f032e5-c325-4196-9870-25a9ca999b62" name="GetItems" type="SubSheetInfo">
<subsheetid>0a5dffc6-e6ba-4ba3-ac44-f30fbd883985</subsheetid>
<narrative>select items from a list and returns a datatable of the results. Always uses LookupValue and mult-selection fields are joined by ValueSeparator</narrative>
<displayx>-75</displayx>
<displayy>-225</displayy>
<displaywidth>150</displaywidth>
<displayheight>60</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
</stage>
<stage stageid="fd2e1eec-bfb0-4719-8c46-f247436e099f" name="Start" type="Start">
<subsheetid>0a5dffc6-e6ba-4ba3-ac44-f30fbd883985</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-30</displayx>
<displayy>-150</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<inputs>
<input type="text" name="ListName" narrative="the name of the list" stage="ListName" />
<input type="text" name="CAMLQuery" narrative="the CAML query to get the items. If unsure, &lt;View/&gt; returns all items" stage="CAMLQuery" />
<input type="collection" name="Fields" narrative="A single string column Collection of the fields to pull" stage="CollFields" />
</inputs>
<onsuccess>2dd5a8b6-30f7-48c9-97c5-341dcc672242</onsuccess>
</stage>
<stage stageid="cc58f710-4b5c-43a9-bda2-2c4d13ae596a" name="SP GetItems" type="Code">
<subsheetid>0a5dffc6-e6ba-4ba3-ac44-f30fbd883985</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-30</displayx>
<displayy>60</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<inputs>
<input type="text" name="listName" expr="[ListName]" />
<input type="text" name="camlQuery" expr="[CAMLQuery]" />
<input type="collection" name="dtFields" expr="[CollFields]" />
</inputs>
<onsuccess>8636aec8-bf7d-4d4e-be92-c9b77027a52e</onsuccess>
<code><![CDATA[// get list
var list = SPCtx.Web.Lists.GetByTitle(listName);
// build query
var qry = new CamlQuery()
{
DatesInUtc = true,
ViewXml = camlQuery
};
var listItems = list.GetItems(qry);
//*/ get fields
var fields = CreateListItemLoadExpressions(
dtFields.Select().Select(r => r[0] as string)
.ToArray());
// LOAD!!!
SPCtx.Load(listItems, items => items.Include(fields));
//*/
// add to our list so we can ref it later
SPItems.Clear();
SPItems.Add(listItems);]]></code>
</stage>
<stage stageid="498928e4-92c6-459a-a18d-f7fa49e0ac6b" name="Sign In" type="SubSheetInfo">
<subsheetid>8abede7e-97d7-4b0b-9789-c05efc93e747</subsheetid>
<narrative>Sign into a SharePoint site using CSOM.
Initialize the ClientContext
Throw exception if unable to connect</narrative>
<displayx>-90</displayx>
<displayy>-255</displayy>
<displaywidth>150</displaywidth>
<displayheight>60</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
</stage>
<stage stageid="0dd9cf1b-927f-42a3-a6ae-e17126e74049" name="Start" type="Start">
<subsheetid>8abede7e-97d7-4b0b-9789-c05efc93e747</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-60</displayx>
<displayy>-195</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<inputs>
<input type="text" name="SiteUrl" narrative="The SharePoint site's base url" stage="SiteUrl" />
<input type="text" name="Username" narrative="The user's email" stage="Username" />
<input type="password" name="Password" narrative="The user's password" stage="Password" />
</inputs>
<onsuccess>cecea608-3c64-42b0-9cb3-40dfc8ebb762</onsuccess>
</stage>
<stage stageid="5a2d1cc9-1fc5-4b0f-b9f3-5d9cd13aa01a" name="set SPCtx" type="Code">
<subsheetid>8abede7e-97d7-4b0b-9789-c05efc93e747</subsheetid>
<narrative>setup the SharePoint Client Context</narrative>
<displayx>-60</displayx>
<displayy>-75</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<inputs>
<input type="text" name="siteUrl" expr="[SiteUrl]" />
<input type="text" name="user" expr="[Username]" />
<input type="password" name="pass" expr="[Password]" />
</inputs>
<onsuccess>bf0f9197-964e-4e1f-862a-0620c43aae94</onsuccess>
<code><![CDATA[// --------------------------
// --- set Context
// --------------------------
var sPass = new SecureString();
foreach (char c in pass) sPass.AppendChar(c);
SPCtx = new ClientContext(siteUrl)
{
//RequestTimeout = 30000,
Credentials = new SharePointOnlineCredentials(user, sPass)
};
// --------------------------
// --- Build Small Query - no need
// --------------------------
/*/ load web title
var web = SPCtx.Web;
SPCtx.Load(web, w => w.Title);
/*/]]></code>
</stage>
<stage stageid="707f67f2-a1a1-407d-b75a-fbfea8ccf397" name="Password" type="Data">
<subsheetid>8abede7e-97d7-4b0b-9789-c05efc93e747</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-135</displayx>
<displayy>-195</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<datatype>password</datatype>
<initialvalueenc>
</initialvalueenc>
<private />
<alwaysinit />
</stage>
<stage stageid="30893a36-0f1f-48b2-babf-794d285c063b" name="Debug" type="Data">
<loginhibit />
<narrative>
</narrative>
<displayx>165</displayx>
<displayy>-135</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<datatype>flag</datatype>
<initialvalue>False</initialvalue>
<alwaysinit />
</stage>
<stage stageid="108e2a83-da0d-42b9-ae17-68b6a707074a" name="SetDebug" type="SubSheetInfo">
<subsheetid>a60e8698-10cf-4250-99cd-7502a41b8269</subsheetid>
<narrative>just set the debug flag</narrative>
<displayx>-90</displayx>
<displayy>-195</displayy>
<displaywidth>120</displaywidth>
<displayheight>60</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
</stage>
<stage stageid="d2006505-9fcc-49c4-9019-621e8f995669" name="Start" type="Start">
<subsheetid>a60e8698-10cf-4250-99cd-7502a41b8269</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-60</displayx>
<displayy>-135</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<inputs>
<input type="flag" name="Debug" narrative="To show MsgBoxes at critical points" stage="Debug" />
</inputs>
<onsuccess>e72046aa-9c96-494f-b0c1-90851c1794c7</onsuccess>
</stage>
<stage stageid="e72046aa-9c96-494f-b0c1-90851c1794c7" name="End" type="End">
<subsheetid>a60e8698-10cf-4250-99cd-7502a41b8269</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-60</displayx>
<displayy>-90</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
</stage>
<stage stageid="2bd29743-5c04-405e-b66f-3fd8e0e14001" name="End1" type="End">
<loginhibit />
<narrative>
</narrative>
<displayx>0</displayx>
<displayy>-45</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
</stage>
<stage stageid="87f85fef-f7b4-4c89-9b90-57eb1ee83c81" name="End" type="End">
<subsheetid>8abede7e-97d7-4b0b-9789-c05efc93e747</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-60</displayx>
<displayy>90</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
</stage>
<stage stageid="7a169b79-1c12-48df-8005-dc39c004475e" name="RunInPlace" type="Data">
<subsheetid>8abede7e-97d7-4b0b-9789-c05efc93e747</subsheetid>
<loginhibit />
<narrative>are you just running this Page? then enable this to debug and clean up!</narrative>
<displayx>-225</displayx>
<displayy>-135</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<datatype>flag</datatype>
<initialvalue>True</initialvalue>
<private />
<alwaysinit />
</stage>
<stage stageid="39f83f83-73e5-4fb3-be63-c39e6e0d2a3c" name="RunInPlace" type="Decision">
<subsheetid>8abede7e-97d7-4b0b-9789-c05efc93e747</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-60</displayx>
<displayy>15</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<decision expression="[RunInPlace]" />
<ontrue>e4a65c67-0cad-41c5-bcee-b00e5b937cf1</ontrue>
<onfalse>87f85fef-f7b4-4c89-9b90-57eb1ee83c81</onfalse>
</stage>
<stage stageid="5223dda0-fb52-4f15-8e70-7eb4b547c05b" name="Success" type="Block">
<subsheetid>8abede7e-97d7-4b0b-9789-c05efc93e747</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-105</displayx>
<displayy>-15</displayy>
<displaywidth>180</displaywidth>
<displayheight>135</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="7FB2E5" />
</stage>
<stage stageid="cecea608-3c64-42b0-9cb3-40dfc8ebb762" name="RunInPlace" type="Decision">
<subsheetid>8abede7e-97d7-4b0b-9789-c05efc93e747</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-60</displayx>
<displayy>-135</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<decision expression="[RunInPlace]=True" />
<ontrue>f72bdd40-b554-458e-85f0-783f3476cd95</ontrue>
<onfalse>5a2d1cc9-1fc5-4b0f-b9f3-5d9cd13aa01a</onfalse>
</stage>
<stage stageid="50b45759-7afa-4519-9dfe-3f2aaca20c5d" name="RunInPlace" type="Data">
<subsheetid>0a5dffc6-e6ba-4ba3-ac44-f30fbd883985</subsheetid>
<loginhibit />
<narrative>are you just running this Page? then enable this to debug and clean up!</narrative>
<displayx>-195</displayx>
<displayy>-75</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<datatype>flag</datatype>
<initialvalue>False</initialvalue>
<private />
<alwaysinit />
</stage>
<stage stageid="61054d12-d1ec-4503-b7fd-b7f06ccd89b2" name="Set Results" type="Code">
<subsheetid>0a5dffc6-e6ba-4ba3-ac44-f30fbd883985</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-30</displayx>
<displayy>150</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<inputs>
<input type="flag" name="IsDebug" expr="[Debug]" />
<input type="collection" name="dtFields" expr="[CollFields]" />
<input type="text" name="valSeparator" expr="[ValueSeparator]" />
</inputs>
<outputs>
<output type="collection" name="dt" stage="CollResults" />
</outputs>
<onsuccess>37186062-99dc-415a-a63b-245105d3a335</onsuccess>
<code><![CDATA[// get listItems from SP cache
var listItems = SPItems[0] as ListItemCollection;
// clear if not debug
if (!IsDebug) SPItems.RemoveAt(0);
// get list of columns
var fields = dtFields.Select()
.Select(r => r[0] as string).ToArray();
// ListItemCollection to DataTable
dt = ListItemsToDataTable(listItems, fields, valSeparator);
// messagebox if debug
if (IsDebug)
{
var text = DataTableToString(dt, 3);
MessageBox.Show(text,
dt.Rows.Count + " Rows Pulled");
}]]></code>
</stage>
<stage stageid="a28245e7-4f91-4e49-81fb-da578366d179" name="Input" type="Block">
<subsheetid>0a5dffc6-e6ba-4ba3-ac44-f30fbd883985</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-255</displayx>
<displayy>-180</displayy>
<displaywidth>180</displaywidth>
<displayheight>60</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="7FB2E5" />
</stage>
<stage stageid="cc40aa89-cb25-4a39-bba9-f7edceec6958" name="ListName" type="Data">
<subsheetid>0a5dffc6-e6ba-4ba3-ac44-f30fbd883985</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-210</displayx>
<displayy>-150</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<datatype>text</datatype>
<initialvalue />
<private />
<alwaysinit />
</stage>
<stage stageid="8182d2f6-a382-4ff5-8450-0edb77c04008" name="CAMLQuery" type="Data">
<subsheetid>0a5dffc6-e6ba-4ba3-ac44-f30fbd883985</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-165</displayx>
<displayy>-150</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<datatype>text</datatype>
<initialvalue />
<private />
<alwaysinit />
</stage>
<stage stageid="57ffdf0d-2ba8-4e69-83eb-382d5fe98faf" name="CollFields" type="Collection">
<subsheetid>0a5dffc6-e6ba-4ba3-ac44-f30fbd883985</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-120</displayx>
<displayy>-150</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<datatype>collection</datatype>
<private />
<alwaysinit />
<collectioninfo>
<field name="Field" type="text" namespace="" description="column name from SharePoint to pull" />
</collectioninfo>
</stage>
<stage stageid="0b3f3d1c-363e-48da-86c0-3b88fafa8066" name="CollResults" type="Collection">
<subsheetid>0a5dffc6-e6ba-4ba3-ac44-f30fbd883985</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>60</displayx>
<displayy>285</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<datatype>collection</datatype>
<private />
<alwaysinit />
</stage>
<stage stageid="bc35b163-e962-4707-a7c4-dd105a078085" name="GetElapsedMilliseconds" type="SubSheetInfo">
<subsheetid>0ca05069-89d3-422f-b15e-ae94b473aed8</subsheetid>
<narrative>return the milliseconds elapsed since object was initialized</narrative>
<displayx>-135</displayx>
<displayy>-180</displayy>
<displaywidth>180</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
</stage>
<stage stageid="bf1a099b-5b49-4f19-94b2-a44e856375eb" name="Start" type="Start">
<subsheetid>0ca05069-89d3-422f-b15e-ae94b473aed8</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-75</displayx>
<displayy>-135</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<onsuccess>402a7b6e-de42-4d07-a182-20fdcdd79e64</onsuccess>
</stage>
<stage stageid="e3569cd1-38ac-4990-a2e1-36d7d09de224" name="End" type="End">
<subsheetid>0ca05069-89d3-422f-b15e-ae94b473aed8</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-75</displayx>
<displayy>-45</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<outputs>
<output type="number" name="ms" narrative="The milliseconds elapsed since object was initialized" stage="ms" />
</outputs>
</stage>
<stage stageid="01872af3-7de5-4b97-ac1e-7f6d0ca27c9f" name="ms" type="Data">
<subsheetid>0ca05069-89d3-422f-b15e-ae94b473aed8</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>0</displayx>
<displayy>-45</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<datatype>number</datatype>
<initialvalue />
<private />
<alwaysinit />
</stage>
<stage stageid="402a7b6e-de42-4d07-a182-20fdcdd79e64" name="Get Elapsed" type="Code">
<subsheetid>0ca05069-89d3-422f-b15e-ae94b473aed8</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-75</displayx>
<displayy>-90</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<outputs>
<output type="number" name="ms" stage="ms" />
</outputs>
<onsuccess>e3569cd1-38ac-4990-a2e1-36d7d09de224</onsuccess>
<code><![CDATA[ms = SPSW.ElapsedMilliseconds;]]></code>
</stage>
<stage stageid="483c0f3c-972a-4abd-9721-ef6eec44222a" name="Init" type="SubSheetInfo">
<subsheetid>b3a13010-3579-4fec-9263-e6b4a8978ee3</subsheetid>
<narrative>internal used for setup</narrative>
<displayx>-105</displayx>
<displayy>-180</displayy>
<displaywidth>120</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
</stage>
<stage stageid="fd7ef836-289b-4747-82d6-11d088e32825" name="Start" type="Start">
<subsheetid>b3a13010-3579-4fec-9263-e6b4a8978ee3</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-75</displayx>
<displayy>-135</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<onsuccess>1ec698fd-0ebd-4fde-99c0-87994757fbc6</onsuccess>
</stage>
<stage stageid="892288cb-01b8-4080-b11b-30de3882bbc0" name="End" type="End">
<subsheetid>b3a13010-3579-4fec-9263-e6b4a8978ee3</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-75</displayx>
<displayy>-45</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
</stage>
<stage stageid="69dc352e-0329-472c-a748-efad4b9d829b" name="Dispose" type="SubSheetInfo">
<subsheetid>13ea01fb-3d78-45c7-a9c6-02c57acb36a2</subsheetid>
<narrative>internal used for clean up</narrative>
<displayx>-105</displayx>
<displayy>-195</displayy>
<displaywidth>120</displaywidth>
<displayheight>60</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
</stage>
<stage stageid="dab376de-98e9-4816-9ba1-b745317d0ffa" name="Start" type="Start">
<subsheetid>13ea01fb-3d78-45c7-a9c6-02c57acb36a2</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-75</displayx>
<displayy>-135</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<onsuccess>c36ca7b4-2ed9-4185-aad0-81f6d5c25cf9</onsuccess>
</stage>
<stage stageid="7623dc51-65f7-4e14-a3a2-6ad4f6ef7978" name="End" type="End">
<subsheetid>13ea01fb-3d78-45c7-a9c6-02c57acb36a2</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-75</displayx>
<displayy>-45</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
</stage>
<stage stageid="1ec698fd-0ebd-4fde-99c0-87994757fbc6" name="Start Stopwatch" type="Code">
<subsheetid>b3a13010-3579-4fec-9263-e6b4a8978ee3</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-75</displayx>
<displayy>-90</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<onsuccess>892288cb-01b8-4080-b11b-30de3882bbc0</onsuccess>
<code><![CDATA[SPSW.Start();]]></code>
</stage>
<stage stageid="59dd7909-19b7-4518-ab4c-79ad5f207719" name="Init" type="SubSheet">
<loginhibit />
<narrative>
</narrative>
<displayx>0</displayx>
<displayy>-90</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<onsuccess>2bd29743-5c04-405e-b66f-3fd8e0e14001</onsuccess>
<processid>b3a13010-3579-4fec-9263-e6b4a8978ee3</processid>
</stage>
<stage stageid="c36ca7b4-2ed9-4185-aad0-81f6d5c25cf9" name="Displose" type="Code">
<subsheetid>13ea01fb-3d78-45c7-a9c6-02c57acb36a2</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-75</displayx>
<displayy>-90</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<inputs>
<input type="flag" name="IsDebug" expr="[Debug]" />
</inputs>
<onsuccess>7623dc51-65f7-4e14-a3a2-6ad4f6ef7978</onsuccess>
<code><![CDATA[// stop stopwatch
SPSW.Stop();
// dispose if any in SP cache need it
foreach (var o in SPItems.OfType<System.IDisposable>()) o.Dispose();
// clear the list
SPItems.Clear();
// try to dispose
if (SPCtx != null)
{
SPCtx.Dispose();
SPCtx = null;
if (IsDebug)
MessageBox.Show(string.Format(
"Elapsed seconds: {0:#,#00.0000}",
SPSW.ElapsedMilliseconds/1000),
"Disposed!");
}
else if (IsDebug)
MessageBox.Show(string.Format(
"Elapsed seconds: {0:#,#00.0000}",
SPSW.ElapsedMilliseconds/1000),
"Already Disposed!");]]></code>
</stage>
<stage stageid="753a8e83-97c1-4526-aeb2-a8c037657e55" name="Dispose" type="SubSheet">
<subsheetid>c24fd0a0-95ed-4259-9af2-8c223123f54b</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-75</displayx>
<displayy>-90</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<onsuccess>27fb8779-4cc4-429a-862f-aa5c242f7b76</onsuccess>
<processid>13ea01fb-3d78-45c7-a9c6-02c57acb36a2</processid>
</stage>
<stage stageid="fbfce0a8-5793-4288-a3a1-28928a75dff0" name="SiteUrl" type="Data">
<loginhibit />
<narrative>
</narrative>
<displayx>90</displayx>
<displayy>-195</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<datatype>text</datatype>
<initialvalue />
<alwaysinit />
</stage>
<stage stageid="bb042871-8d29-4209-a589-e04149a03ec3" name="Username" type="Data">
<loginhibit />
<narrative>
</narrative>
<displayx>90</displayx>
<displayy>-165</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<datatype>text</datatype>
<initialvalue />
<alwaysinit />
</stage>
<stage stageid="8cf82817-1346-416e-a5cf-459db6bfa353" name="Set Debug" type="MultipleCalculation">
<subsheetid>8abede7e-97d7-4b0b-9789-c05efc93e747</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-150</displayx>
<displayy>-75</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<onsuccess>5a2d1cc9-1fc5-4b0f-b9f3-5d9cd13aa01a</onsuccess>
<steps>
<calculation expression="True" stage="Debug" />
<calculation expression="&quot;https://my/sharepoint/site/&quot;" stage="SiteUrl" />
<calculation expression="&quot;username&quot;" stage="Username" />
<calculation expression="[_Password]" stage="Password" />
</steps>
</stage>
<stage stageid="e4a65c67-0cad-41c5-bcee-b00e5b937cf1" name="Dispose" type="SubSheet">
<subsheetid>8abede7e-97d7-4b0b-9789-c05efc93e747</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>30</displayx>
<displayy>15</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<onsuccess>87f85fef-f7b4-4c89-9b90-57eb1ee83c81</onsuccess>
<processid>13ea01fb-3d78-45c7-a9c6-02c57acb36a2</processid>
</stage>
<stage stageid="2dd5a8b6-30f7-48c9-97c5-341dcc672242" name="RunInPlace" type="Decision">
<subsheetid>0a5dffc6-e6ba-4ba3-ac44-f30fbd883985</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-30</displayx>
<displayy>-75</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<decision expression="[RunInPlace]" />
<ontrue>abc508d8-d8a9-4cf1-9b17-0b474cba6a4b</ontrue>
<onfalse>cc58f710-4b5c-43a9-bda2-2c4d13ae596a</onfalse>
</stage>
<stage stageid="ea686b7c-9429-4beb-9a1a-8a5c2d46191f" name="Set Debug" type="MultipleCalculation">
<subsheetid>0a5dffc6-e6ba-4ba3-ac44-f30fbd883985</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-120</displayx>
<displayy>-30</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<onsuccess>7a7a8a49-a3c5-42ac-835a-26c6076c7edd</onsuccess>
<steps>
<calculation expression="True" stage="Debug" />
<calculation expression="&quot;https://my/sharepoint/site/&quot;" stage="SiteUrl" />
<calculation expression="&quot;username&quot;" stage="Username" />
<calculation expression="&quot;My List&quot;" stage="ListName" />
<calculation expression="&quot;&lt;View&gt;&#xA; &lt;RowLimit Paged='TRUE'&gt;9&lt;/RowLimit&gt;&#xA; &lt;Query&gt;&lt;Where&gt;&lt;Neq&gt;&#xA; &lt;FieldRef Name='Processed' /&gt;&#xA; &lt;Value Type='Boolean'&gt;1&lt;/Value&gt;&#xA; &lt;/Neq&gt;&lt;/Where&gt;&lt;/Query&gt;&#xA;&lt;/View&gt;&quot;" stage="CAMLQuery" />
</steps>
</stage>
<stage stageid="7a7a8a49-a3c5-42ac-835a-26c6076c7edd" name="Sign In" type="SubSheet">
<subsheetid>0a5dffc6-e6ba-4ba3-ac44-f30fbd883985</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-120</displayx>
<displayy>15</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<inputs>
<input type="text" name="SiteUrl" narrative="The SharePoint site's base url" expr="[SiteUrl]" />
<input type="text" name="Username" narrative="The user's email" expr="[Username]" />
<input type="password" name="Password" narrative="The user's password" expr="[_Password]" />
</inputs>
<onsuccess>bd05318f-bf24-42e1-9572-d933297eb0e5</onsuccess>
<processid>8abede7e-97d7-4b0b-9789-c05efc93e747</processid>
</stage>
<stage stageid="4f261a11-499a-4814-b544-697d0fb5ccab" name="_Password" type="Data">
<subsheetid>0a5dffc6-e6ba-4ba3-ac44-f30fbd883985</subsheetid>
<loginhibit />
<narrative>set the password for debugging - when RunInPlace is true</narrative>
<displayx>-195</displayx>
<displayy>-45</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<datatype>password</datatype>
<initialvalueenc>
</initialvalueenc>
<private />
<alwaysinit />
</stage>
<stage stageid="299bfcad-93ca-45e1-9b33-dd840895efa0" name="RUN IN PLACE" type="Block">
<subsheetid>8abede7e-97d7-4b0b-9789-c05efc93e747</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-270</displayx>
<displayy>-165</displayy>
<displaywidth>165</displaywidth>
<displayheight>120</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="FF0000" />
</stage>
<stage stageid="8c20e77f-34d0-4ffb-b0a0-db9d292f1bf5" name="RUN IN PLACE" type="Block">
<subsheetid>0a5dffc6-e6ba-4ba3-ac44-f30fbd883985</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-240</displayx>
<displayy>-105</displayy>
<displaywidth>165</displaywidth>
<displayheight>210</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="FF0000" />
</stage>
<stage stageid="8b23ff1f-ee5e-407f-99a5-b329c382ac52" name="_Password" type="Data">
<subsheetid>8abede7e-97d7-4b0b-9789-c05efc93e747</subsheetid>
<loginhibit />
<narrative>set the password for debugging - when RunInPlace is true</narrative>
<displayx>-225</displayx>
<displayy>-105</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<datatype>password</datatype>
<initialvalueenc>
</initialvalueenc>
<private />
<alwaysinit />
</stage>
<stage stageid="69dc3111-99f0-4d66-8066-9b302d6ca4bd" name="TryExecute" type="SubSheetInfo">
<subsheetid>9c323c5b-a1a8-4436-8283-a21b2323687f</subsheetid>
<narrative>internal try-catch around ExecuteQuery</narrative>
<displayx>-120</displayx>
<displayy>-210</displayy>
<displaywidth>120</displaywidth>
<displayheight>60</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
</stage>
<stage stageid="f9e05f28-4150-4929-bbaf-eb796e95673a" name="Start" type="Start">
<subsheetid>9c323c5b-a1a8-4436-8283-a21b2323687f</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-90</displayx>
<displayy>-150</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<onsuccess>7689dbaf-6715-4e4f-a8f3-a3f3e78f23ae</onsuccess>
</stage>
<stage stageid="4c91c110-64a8-4f26-b389-9f071f7718d3" name="Class Properties" type="Block">
<loginhibit />
<narrative>
</narrative>
<displayx>45</displayx>
<displayy>-225</displayy>
<displaywidth>165</displaywidth>
<displayheight>210</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="7FB2E5" />
</stage>
<stage stageid="eea04ac1-f6c2-4de3-a06e-032bd44f07ae" name="Execute TryLimit" type="Data">
<loginhibit />
<narrative>
</narrative>
<displayx>90</displayx>
<displayy>-105</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<datatype>number</datatype>
<initialvalue>3</initialvalue>
<alwaysinit />
</stage>
<stage stageid="7e16f3a2-e3ff-4989-94ba-cf2a89b787e8" name="Execute RetryDelay" type="Data">
<loginhibit />
<narrative>
</narrative>
<displayx>90</displayx>
<displayy>-75</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<datatype>number</datatype>
<initialvalue>3</initialvalue>
<alwaysinit />
</stage>
<stage stageid="bf7acfbe-1685-499d-aa86-9003c15d5e94" name="RecoverEx" type="Recover">
<subsheetid>9c323c5b-a1a8-4436-8283-a21b2323687f</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>105</displayx>
<displayy>0</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<onsuccess>66c5c9d9-7bbd-4c67-ab86-3848cf1eb4be</onsuccess>
</stage>
<stage stageid="21780f5a-efd8-4ca4-82d7-e877326ada8e" name="ExType" type="Data">
<subsheetid>9c323c5b-a1a8-4436-8283-a21b2323687f</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>45</displayx>
<displayy>-165</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<datatype>text</datatype>
<initialvalue />
<private />
<alwaysinit />
</stage>
<stage stageid="e7a8aa47-0766-4950-ad45-00bd7fd59390" name="ExDetail" type="Data">
<subsheetid>9c323c5b-a1a8-4436-8283-a21b2323687f</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>180</displayx>
<displayy>-150</displayy>
<displaywidth>270</displaywidth>
<displayheight>60</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<datatype>text</datatype>
<initialvalue />
<private />
<alwaysinit />
</stage>
<stage stageid="6aa52a32-5d9a-4274-8a8e-fa386bf52771" name="Set Ex" type="MultipleCalculation">
<subsheetid>9c323c5b-a1a8-4436-8283-a21b2323687f</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>165</displayx>
<displayy>75</displayy>
<displaywidth>30</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<onsuccess>e6674835-140b-4c20-9224-899adcb4b47d</onsuccess>
<steps>
<calculation expression="ExceptionType()" stage="ExType" />
<calculation expression="ExceptionDetail()" stage="ExDetail" />
</steps>
</stage>
<stage stageid="473b0da4-85ba-47bb-b763-4bc84fe8558d" name="TryCount" type="Data">
<subsheetid>9c323c5b-a1a8-4436-8283-a21b2323687f</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>60</displayx>
<displayy>-210</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<datatype>number</datatype>
<initialvalue>1</initialvalue>
<private />
<alwaysinit />
</stage>
<stage stageid="5907ec81-c04a-463a-965d-dd7233fa7d66" name="retry &gt;= limit" type="Decision">
<subsheetid>9c323c5b-a1a8-4436-8283-a21b2323687f</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>270</displayx>
<displayy>0</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<decision expression="[TryCount]&gt;=[TryLimit] OR Lower([ExDetail])=&quot;system exception&quot;" />
<ontrue>70f8ae14-dea8-40f5-a561-d0eb3459866a</ontrue>
<onfalse>81e13da6-eec4-44c4-8c67-26a59b1c50d0</onfalse>
</stage>
<stage stageid="81e13da6-eec4-44c4-8c67-26a59b1c50d0" name="+1" type="Calculation">
<subsheetid>9c323c5b-a1a8-4436-8283-a21b2323687f</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>270</displayx>
<displayy>-60</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<onsuccess>760f355d-2d11-4eee-9aa5-c548ce9af619</onsuccess>
<calculation expression="[TryCount]+1" stage="TryCount" />
</stage>
<stage stageid="d01c9b59-69d6-4791-9800-6629f585d504" name="TryExecute Error Msgbox" type="Code">
<subsheetid>9c323c5b-a1a8-4436-8283-a21b2323687f</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>465</displayx>
<displayy>0</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<inputs>
<input type="text" name="exType" expr="[ExType]" />
<input type="text" name="exDetail" expr="[ExDetail]" />
</inputs>
<onsuccess>d5327463-e0ef-42c5-9855-ff5437a0419c</onsuccess>
<code><![CDATA[MessageBox.Show(exDetail,exType);]]></code>
</stage>
<stage stageid="1a3919c5-3dac-467e-8414-906bdf79aa0f" name="ExecuteQuery TryExecute" type="Code">
<subsheetid>9c323c5b-a1a8-4436-8283-a21b2323687f</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>30</displayx>
<displayy>0</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<inputs>
<input type="flag" name="IsDebug" expr="[Debug]" />
<input type="flag" name="isRunInPlace" expr="[RunInPlace]" />
<input type="flag" name="shouldFail" expr="[_RunFail]" />
<input type="number" name="tryCount" expr="[TryCount]" />
<input type="number" name="tryLimit" expr="[TryLimit]" />
</inputs>
<outputs>
<output type="number" name="exTime" stage="ExecuteTime" />
</outputs>
<onsuccess>acf10fe9-ee62-419b-bb30-8dd62744291a</onsuccess>
<code><![CDATA[// execute, tracking time.
var sw = System.Diagnostics.Stopwatch.StartNew();
try
{
if (isRunInPlace)
if (shouldFail) throw new Exception("some error");
else System.Threading.Thread.Sleep(1000);
else
SPCtx.ExecuteQuery();
}
catch (Exception e)
{
//*/ show message box if debug
if (IsDebug)
{
sw.Stop();
MessageBox.Show(string.Format(
"Try {0:00}/{1:00} failed after {2:#,#00.00} seconds{3}{4}",
tryCount,tryLimit,
sw.ElapsedMilliseconds/1000,
Environment.NewLine,e),
"ERROR: Log In Fail");
}//*/
// re-throw exception
throw e;
}
// success! set exTime
sw.Stop();
exTime = sw.ElapsedMilliseconds / 1000;]]></code>
</stage>
<stage stageid="dc53ff32-e643-4faf-88f2-ebf5d90f056d" name="TryLimit" type="Data">
<subsheetid>9c323c5b-a1a8-4436-8283-a21b2323687f</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>105</displayx>
<displayy>-210</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<datatype>number</datatype>
<initialvalue />
<private />
<alwaysinit />
</stage>
<stage stageid="5e8293a2-93a8-49de-b0a6-2921a8203328" name="RetryDelay" type="Data">
<subsheetid>9c323c5b-a1a8-4436-8283-a21b2323687f</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>165</displayx>
<displayy>-210</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<datatype>number</datatype>
<initialvalue />
<private />
<alwaysinit />
</stage>
<stage stageid="06a02198-677c-48b4-84a9-8ba52aae9bbc" name="ExecuteTime" type="Data">
<subsheetid>9c323c5b-a1a8-4436-8283-a21b2323687f</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>225</displayx>
<displayy>-210</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<datatype>number</datatype>
<initialvalue>0</initialvalue>
<private />
<alwaysinit />
</stage>
<stage stageid="0439bcde-6447-4531-b7c1-d1e2cd4946ac" name="Time Out - Wait Exe" type="WaitEnd">
<subsheetid>9c323c5b-a1a8-4436-8283-a21b2323687f</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>30</displayx>
<displayy>-60</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<onsuccess>d93f83e5-c249-4bde-8b9e-ff78fda64007</onsuccess>
<groupid>ab88da80-5708-4f98-abc0-b05d197c1677</groupid>
</stage>
<stage stageid="064b19ae-e577-4307-ab76-8cb6c92c2487" name="Wait Exe" type="WaitStart">
<subsheetid>9c323c5b-a1a8-4436-8283-a21b2323687f</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>105</displayx>
<displayy>-60</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<groupid>ab88da80-5708-4f98-abc0-b05d197c1677</groupid>
<choices />
<timeout>[RetryDelay]</timeout>
</stage>
<stage stageid="e6674835-140b-4c20-9224-899adcb4b47d" name="Fix Ex" type="Decision">
<subsheetid>9c323c5b-a1a8-4436-8283-a21b2323687f</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>210</displayx>
<displayy>75</displayy>
<displaywidth>30</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<decision expression="Lower([ExType]) = &quot;internal&quot;" />
<ontrue>76615911-3ac6-4721-a471-d6f481e25df1</ontrue>
<onfalse>1c6c0511-4415-4ae5-945c-9020012e0c40</onfalse>
</stage>
<stage stageid="76615911-3ac6-4721-a471-d6f481e25df1" name="Fix Ex" type="Calculation">
<subsheetid>9c323c5b-a1a8-4436-8283-a21b2323687f</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>210</displayx>
<displayy>120</displayy>
<displaywidth>30</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<onsuccess>1c6c0511-4415-4ae5-945c-9020012e0c40</onsuccess>
<calculation expression="Mid([ExDetail],InStr([ExDetail],&quot;:&quot;)+2,999)" stage="ExDetail" />
</stage>
<stage stageid="6e616073-205c-408a-b76a-39ef6c6bf1ce" name="End" type="End">
<subsheetid>9c323c5b-a1a8-4436-8283-a21b2323687f</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-90</displayx>
<displayy>180</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
</stage>
<stage stageid="f4d48159-4c1d-4e20-a790-f8f7d383027f" name="Try-Catch Variables" type="Block">
<subsheetid>9c323c5b-a1a8-4436-8283-a21b2323687f</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>0</displayx>
<displayy>-240</displayy>
<displaywidth>315</displaywidth>
<displayheight>120</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="7FB2E5" />
</stage>
<stage stageid="98a66ebe-92e4-4eaa-8b24-d2f37a9d3fbe" name="Anchor2" type="Anchor">
<subsheetid>9c323c5b-a1a8-4436-8283-a21b2323687f</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-45</displayx>
<displayy>0</displayy>
<displaywidth>10</displaywidth>
<displayheight>10</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<onsuccess>1a3919c5-3dac-467e-8414-906bdf79aa0f</onsuccess>
</stage>
<stage stageid="d93f83e5-c249-4bde-8b9e-ff78fda64007" name="Anchor3" type="Anchor">
<subsheetid>9c323c5b-a1a8-4436-8283-a21b2323687f</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-45</displayx>
<displayy>-60</displayy>
<displaywidth>10</displaywidth>
<displayheight>10</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<onsuccess>98a66ebe-92e4-4eaa-8b24-d2f37a9d3fbe</onsuccess>
</stage>
<stage stageid="1c6c0511-4415-4ae5-945c-9020012e0c40" name="Anchor1" type="Anchor">
<subsheetid>9c323c5b-a1a8-4436-8283-a21b2323687f</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>270</displayx>
<displayy>75</displayy>
<displaywidth>10</displaywidth>
<displayheight>10</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<onsuccess>5907ec81-c04a-463a-965d-dd7233fa7d66</onsuccess>
</stage>
<stage stageid="8b6ec34d-469b-4d73-b9df-032640dba311" name="RunInPlace" type="Decision">
<subsheetid>9c323c5b-a1a8-4436-8283-a21b2323687f</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-90</displayx>
<displayy>120</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<decision expression="[RunInPlace]" />
<ontrue>1075f6dc-6a48-4fc8-8a23-9d2f35b9b18e</ontrue>
<onfalse>6e616073-205c-408a-b76a-39ef6c6bf1ce</onfalse>
</stage>
<stage stageid="81f0779c-ef20-4fcb-b1fa-831b2e175f07" name="Success" type="Block">
<subsheetid>9c323c5b-a1a8-4436-8283-a21b2323687f</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-135</displayx>
<displayy>90</displayy>
<displaywidth>180</displaywidth>
<displayheight>120</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="7FB2E5" />
</stage>
<stage stageid="c080ca79-7bb1-4913-9849-ad62e6c0d988" name="Failed" type="Block">
<subsheetid>9c323c5b-a1a8-4436-8283-a21b2323687f</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>345</displayx>
<displayy>-30</displayy>
<displaywidth>165</displaywidth>
<displayheight>165</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="7FB2E5" />
</stage>
<stage stageid="3d944fea-72d9-48b5-af24-8ac3a8271a26" name="Try Execute" type="Block">
<subsheetid>9c323c5b-a1a8-4436-8283-a21b2323687f</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-15</displayx>
<displayy>-30</displayy>
<displaywidth>165</displaywidth>
<displayheight>60</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="FFFF00" />
</stage>
<stage stageid="70f8ae14-dea8-40f5-a561-d0eb3459866a" name="Debug" type="Decision">
<subsheetid>9c323c5b-a1a8-4436-8283-a21b2323687f</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>390</displayx>
<displayy>0</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<decision expression="[Debug]" />
<ontrue>d01c9b59-69d6-4791-9800-6629f585d504</ontrue>
<onfalse>d5327463-e0ef-42c5-9855-ff5437a0419c</onfalse>
</stage>
<stage stageid="691fe686-1ac1-4c2b-b9c2-31a5d40a4d95" name="re-throw" type="Exception">
<subsheetid>9c323c5b-a1a8-4436-8283-a21b2323687f</subsheetid>
<narrative>
</narrative>
<displayx>390</displayx>
<displayy>105</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<exception type="System Exception" detail="[ExDetail]" />
</stage>
<stage stageid="d5327463-e0ef-42c5-9855-ff5437a0419c" name="RunInPlace" type="Decision">
<subsheetid>9c323c5b-a1a8-4436-8283-a21b2323687f</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>390</displayx>
<displayy>60</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<decision expression="[RunInPlace]" />
<ontrue>d9a6bcde-9ee4-4605-9c61-0ae5bfe05e8f</ontrue>
<onfalse>691fe686-1ac1-4c2b-b9c2-31a5d40a4d95</onfalse>
</stage>
<stage stageid="d9a6bcde-9ee4-4605-9c61-0ae5bfe05e8f" name="Dispose" type="SubSheet">
<subsheetid>9c323c5b-a1a8-4436-8283-a21b2323687f</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>465</displayx>
<displayy>60</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<onsuccess>691fe686-1ac1-4c2b-b9c2-31a5d40a4d95</onsuccess>
<processid>13ea01fb-3d78-45c7-a9c6-02c57acb36a2</processid>
</stage>
<stage stageid="1075f6dc-6a48-4fc8-8a23-9d2f35b9b18e" name="Dispose" type="SubSheet">
<subsheetid>9c323c5b-a1a8-4436-8283-a21b2323687f</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>0</displayx>
<displayy>120</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<onsuccess>6e616073-205c-408a-b76a-39ef6c6bf1ce</onsuccess>
<processid>13ea01fb-3d78-45c7-a9c6-02c57acb36a2</processid>
</stage>
<stage stageid="30fc8b0d-10f8-40b8-8221-2b431de10033" name="RUN IN PLACE" type="Block">
<subsheetid>9c323c5b-a1a8-4436-8283-a21b2323687f</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-300</displayx>
<displayy>-90</displayy>
<displaywidth>165</displaywidth>
<displayheight>120</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="FF0000" />
</stage>
<stage stageid="40490eab-be53-4cc5-abe0-2306d98dcf6b" name="RunInPlace" type="Data">
<subsheetid>9c323c5b-a1a8-4436-8283-a21b2323687f</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-255</displayx>
<displayy>-60</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<datatype>flag</datatype>
<initialvalue>False</initialvalue>
<private />
<alwaysinit />
</stage>
<stage stageid="49ba8166-80df-4383-a44f-18732703a25b" name="_RunFail" type="Data">
<subsheetid>9c323c5b-a1a8-4436-8283-a21b2323687f</subsheetid>
<loginhibit />
<narrative>If True, Execute thows an exception. If False, the process runs normally.</narrative>
<displayx>-255</displayx>
<displayy>-30</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<datatype>flag</datatype>
<initialvalue>True</initialvalue>
<private />
<alwaysinit />
</stage>
<stage stageid="7689dbaf-6715-4e4f-a8f3-a3f3e78f23ae" name="set local" type="MultipleCalculation">
<subsheetid>9c323c5b-a1a8-4436-8283-a21b2323687f</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-90</displayx>
<displayy>-105</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<onsuccess>96bb3133-1ad1-4b51-990e-8414628daab2</onsuccess>
<steps>
<calculation expression="[Execute RetryDelay]" stage="RetryDelay" />
<calculation expression="[Execute TryLimit]" stage="TryLimit" />
</steps>
</stage>
<stage stageid="96bb3133-1ad1-4b51-990e-8414628daab2" name="RunInPlace" type="Decision">
<subsheetid>9c323c5b-a1a8-4436-8283-a21b2323687f</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-90</displayx>
<displayy>-60</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<decision expression="[RunInPlace]" />
<ontrue>dc092d61-1544-4258-9613-296c910750a6</ontrue>
<onfalse>80519154-5f59-48b5-aa2c-ccb75f9fd5ae</onfalse>
</stage>
<stage stageid="f684dd3f-6384-4e51-8247-1092da1df455" name="Set Debug" type="MultipleCalculation">
<subsheetid>9c323c5b-a1a8-4436-8283-a21b2323687f</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-180</displayx>
<displayy>0</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<onsuccess>80519154-5f59-48b5-aa2c-ccb75f9fd5ae</onsuccess>
<steps>
<calculation expression="True" stage="Debug" />
<calculation expression="1" stage="RetryDelay" />
<calculation expression="2" stage="TryLimit" />
</steps>
</stage>
<stage stageid="dc092d61-1544-4258-9613-296c910750a6" name="Init" type="SubSheet">
<subsheetid>9c323c5b-a1a8-4436-8283-a21b2323687f</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-180</displayx>
<displayy>-60</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<onsuccess>f684dd3f-6384-4e51-8247-1092da1df455</onsuccess>
<processid>b3a13010-3579-4fec-9263-e6b4a8978ee3</processid>
</stage>
<stage stageid="80519154-5f59-48b5-aa2c-ccb75f9fd5ae" name="Anchor6" type="Anchor">
<subsheetid>9c323c5b-a1a8-4436-8283-a21b2323687f</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-90</displayx>
<displayy>0</displayy>
<displaywidth>10</displaywidth>
<displayheight>10</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<onsuccess>98a66ebe-92e4-4eaa-8b24-d2f37a9d3fbe</onsuccess>
</stage>
<stage stageid="96b86626-47cb-42df-bce4-fbe24bce4a3d" name="Anchor7" type="Anchor">
<subsheetid>9c323c5b-a1a8-4436-8283-a21b2323687f</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-90</displayx>
<displayy>60</displayy>
<displaywidth>10</displaywidth>
<displayheight>10</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<onsuccess>8b6ec34d-469b-4d73-b9df-032640dba311</onsuccess>
</stage>
<stage stageid="acf10fe9-ee62-419b-bb30-8dd62744291a" name="Anchor8" type="Anchor">
<subsheetid>9c323c5b-a1a8-4436-8283-a21b2323687f</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>30</displayx>
<displayy>60</displayy>
<displaywidth>10</displaywidth>
<displayheight>10</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<onsuccess>96b86626-47cb-42df-bce4-fbe24bce4a3d</onsuccess>
</stage>
<stage stageid="760f355d-2d11-4eee-9aa5-c548ce9af619" name="ResumeEx" type="Resume">
<subsheetid>9c323c5b-a1a8-4436-8283-a21b2323687f</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>180</displayx>
<displayy>-60</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<onsuccess>064b19ae-e577-4307-ab76-8cb6c92c2487</onsuccess>
</stage>
<stage stageid="3f1b8d05-417d-49d8-8459-c07cd42c62a4" name="Keep Trying" type="Block">
<subsheetid>9c323c5b-a1a8-4436-8283-a21b2323687f</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>225</displayx>
<displayy>-90</displayy>
<displaywidth>90</displaywidth>
<displayheight>120</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="7FB2E5" />
</stage>
<stage stageid="66c5c9d9-7bbd-4c67-ab86-3848cf1eb4be" name="Anchor9" type="Anchor">
<subsheetid>9c323c5b-a1a8-4436-8283-a21b2323687f</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>105</displayx>
<displayy>75</displayy>
<displaywidth>10</displaywidth>
<displayheight>10</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<onsuccess>6aa52a32-5d9a-4274-8a8e-fa386bf52771</onsuccess>
</stage>
<stage stageid="adb17db0-78d9-4399-9c80-b8e896330f6b" name="Get Internal Exception Details" type="Block">
<subsheetid>9c323c5b-a1a8-4436-8283-a21b2323687f</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>135</displayx>
<displayy>45</displayy>
<displaywidth>150</displaywidth>
<displayheight>105</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="7FB2E5" />
</stage>
<stage stageid="f72bdd40-b554-458e-85f0-783f3476cd95" name="Init" type="SubSheet">
<subsheetid>8abede7e-97d7-4b0b-9789-c05efc93e747</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-150</displayx>
<displayy>-135</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<onsuccess>8cf82817-1346-416e-a5cf-459db6bfa353</onsuccess>
<processid>b3a13010-3579-4fec-9263-e6b4a8978ee3</processid>
</stage>
<stage stageid="bf0f9197-964e-4e1f-862a-0620c43aae94" name="TryExecute" type="SubSheet">
<subsheetid>8abede7e-97d7-4b0b-9789-c05efc93e747</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>30</displayx>
<displayy>-75</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<onsuccess>896bd9de-7444-4d82-bda3-d362f4403575</onsuccess>
<processid>9c323c5b-a1a8-4436-8283-a21b2323687f</processid>
</stage>
<stage stageid="93ad7e50-5e46-417d-bc05-1718e1b0687d" name="TryExecute - clean up" type="Block">
<subsheetid>8abede7e-97d7-4b0b-9789-c05efc93e747</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-15</displayx>
<displayy>-105</displayy>
<displaywidth>165</displaywidth>
<displayheight>60</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="FFFF00" />
</stage>
<stage stageid="a1f15d5c-4683-4df2-bc62-5ba9af72045e" name="Failed" type="Block">
<subsheetid>8abede7e-97d7-4b0b-9789-c05efc93e747</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>165</displayx>
<displayy>-105</displayy>
<displaywidth>165</displaywidth>
<displayheight>105</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="7FB2E5" />
</stage>
<stage stageid="9ea93aa0-0efb-4a2e-a39e-dd5679138647" name="re-throw" type="Exception">
<subsheetid>8abede7e-97d7-4b0b-9789-c05efc93e747</subsheetid>
<narrative>
</narrative>
<displayx>210</displayx>
<displayy>-30</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<exception type="System Exception" detail="" usecurrent="yes" />
</stage>
<stage stageid="0257fcb4-ac8f-4d2b-84a1-751daafb0eda" name="RunInPlace" type="Decision">
<subsheetid>8abede7e-97d7-4b0b-9789-c05efc93e747</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>210</displayx>
<displayy>-75</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<decision expression="[RunInPlace]" />
<ontrue>86d23c4c-a43e-4c5a-ade8-12919c68d922</ontrue>
<onfalse>9ea93aa0-0efb-4a2e-a39e-dd5679138647</onfalse>
</stage>
<stage stageid="86d23c4c-a43e-4c5a-ade8-12919c68d922" name="Dispose" type="SubSheet">
<subsheetid>8abede7e-97d7-4b0b-9789-c05efc93e747</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>285</displayx>
<displayy>-75</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<onsuccess>9ea93aa0-0efb-4a2e-a39e-dd5679138647</onsuccess>
<processid>13ea01fb-3d78-45c7-a9c6-02c57acb36a2</processid>
</stage>
<stage stageid="d845aa25-30a6-4daa-b0ad-8a478a3b26b6" name="RecoverEx" type="Recover">
<subsheetid>8abede7e-97d7-4b0b-9789-c05efc93e747</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>105</displayx>
<displayy>-75</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<onsuccess>0257fcb4-ac8f-4d2b-84a1-751daafb0eda</onsuccess>
</stage>
<stage stageid="896bd9de-7444-4d82-bda3-d362f4403575" name="Anchor4" type="Anchor">
<subsheetid>8abede7e-97d7-4b0b-9789-c05efc93e747</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>30</displayx>
<displayy>-30</displayy>
<displaywidth>10</displaywidth>
<displayheight>10</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<onsuccess>6de61acd-1cba-422b-a5fd-b7e39eb2fd32</onsuccess>
</stage>
<stage stageid="6de61acd-1cba-422b-a5fd-b7e39eb2fd32" name="Anchor10" type="Anchor">
<subsheetid>8abede7e-97d7-4b0b-9789-c05efc93e747</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-60</displayx>
<displayy>-30</displayy>
<displaywidth>10</displaywidth>
<displayheight>10</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<onsuccess>39f83f83-73e5-4fb3-be63-c39e6e0d2a3c</onsuccess>
</stage>
<stage stageid="abc508d8-d8a9-4cf1-9b17-0b474cba6a4b" name="Init" type="SubSheet">
<subsheetid>0a5dffc6-e6ba-4ba3-ac44-f30fbd883985</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-120</displayx>
<displayy>-75</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<onsuccess>ea686b7c-9429-4beb-9a1a-8a5c2d46191f</onsuccess>
<processid>b3a13010-3579-4fec-9263-e6b4a8978ee3</processid>
</stage>
<stage stageid="374fc985-ed87-4a71-8f9f-dff96021ec79" name="End" type="End">
<subsheetid>0a5dffc6-e6ba-4ba3-ac44-f30fbd883985</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-30</displayx>
<displayy>285</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<outputs>
<output type="collection" name="Result" narrative="The resulting Collection (DataTable) from the query" stage="CollResults" />
</outputs>
</stage>
<stage stageid="37186062-99dc-415a-a63b-245105d3a335" name="RunInPlace" type="Decision">
<subsheetid>0a5dffc6-e6ba-4ba3-ac44-f30fbd883985</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-30</displayx>
<displayy>210</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<decision expression="[RunInPlace]" />
<ontrue>58bffa9c-7a7e-44d9-8369-384ef8f7fbf8</ontrue>
<onfalse>374fc985-ed87-4a71-8f9f-dff96021ec79</onfalse>
</stage>
<stage stageid="42fdaced-d9bd-4c74-a565-105526d82af5" name="Success" type="Block">
<subsheetid>0a5dffc6-e6ba-4ba3-ac44-f30fbd883985</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-75</displayx>
<displayy>120</displayy>
<displaywidth>180</displaywidth>
<displayheight>195</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="7FB2E5" />
</stage>
<stage stageid="58bffa9c-7a7e-44d9-8369-384ef8f7fbf8" name="Dispose" type="SubSheet">
<subsheetid>0a5dffc6-e6ba-4ba3-ac44-f30fbd883985</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>60</displayx>
<displayy>210</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<onsuccess>374fc985-ed87-4a71-8f9f-dff96021ec79</onsuccess>
<processid>13ea01fb-3d78-45c7-a9c6-02c57acb36a2</processid>
</stage>
<stage stageid="8636aec8-bf7d-4d4e-be92-c9b77027a52e" name="TryExecute" type="SubSheet">
<subsheetid>0a5dffc6-e6ba-4ba3-ac44-f30fbd883985</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>60</displayx>
<displayy>60</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<onsuccess>50c17966-5299-4158-b50a-137c6caeaec2</onsuccess>
<processid>9c323c5b-a1a8-4436-8283-a21b2323687f</processid>
</stage>
<stage stageid="c7881027-89ac-4b42-bc60-c07432ce3232" name="TryExecute - clean up" type="Block">
<subsheetid>0a5dffc6-e6ba-4ba3-ac44-f30fbd883985</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>15</displayx>
<displayy>30</displayy>
<displaywidth>165</displaywidth>
<displayheight>60</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="FFFF00" />
</stage>
<stage stageid="fa80b06b-6518-44fd-89a5-1265d2caf999" name="Failed" type="Block">
<subsheetid>0a5dffc6-e6ba-4ba3-ac44-f30fbd883985</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>195</displayx>
<displayy>30</displayy>
<displaywidth>165</displaywidth>
<displayheight>105</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="7FB2E5" />
</stage>
<stage stageid="1f6cdbb4-b7f5-49ca-994c-8a485f352295" name="re-throw" type="Exception">
<subsheetid>0a5dffc6-e6ba-4ba3-ac44-f30fbd883985</subsheetid>
<narrative>
</narrative>
<displayx>240</displayx>
<displayy>105</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<exception type="System Exception" detail="" usecurrent="yes" />
</stage>
<stage stageid="6190e267-0a14-46de-8dae-26586c146e5d" name="RunInPlace" type="Decision">
<subsheetid>0a5dffc6-e6ba-4ba3-ac44-f30fbd883985</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>240</displayx>
<displayy>60</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<decision expression="[RunInPlace]" />
<ontrue>f860bc2c-7361-47b5-b60a-f9d95f9a5393</ontrue>
<onfalse>1f6cdbb4-b7f5-49ca-994c-8a485f352295</onfalse>
</stage>
<stage stageid="f860bc2c-7361-47b5-b60a-f9d95f9a5393" name="Dispose" type="SubSheet">
<subsheetid>0a5dffc6-e6ba-4ba3-ac44-f30fbd883985</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>315</displayx>
<displayy>60</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<onsuccess>1f6cdbb4-b7f5-49ca-994c-8a485f352295</onsuccess>
<processid>13ea01fb-3d78-45c7-a9c6-02c57acb36a2</processid>
</stage>
<stage stageid="255e158d-42fe-4baf-854a-2ae5462193bf" name="RecoverEx" type="Recover">
<subsheetid>0a5dffc6-e6ba-4ba3-ac44-f30fbd883985</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>135</displayx>
<displayy>60</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<onsuccess>6190e267-0a14-46de-8dae-26586c146e5d</onsuccess>
</stage>
<stage stageid="50c17966-5299-4158-b50a-137c6caeaec2" name="Anchor4" type="Anchor">
<subsheetid>0a5dffc6-e6ba-4ba3-ac44-f30fbd883985</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>60</displayx>
<displayy>105</displayy>
<displaywidth>10</displaywidth>
<displayheight>10</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<onsuccess>d0fd1342-01ff-4d9b-85a4-a8bed913900e</onsuccess>
</stage>
<stage stageid="d0fd1342-01ff-4d9b-85a4-a8bed913900e" name="Anchor10" type="Anchor">
<subsheetid>0a5dffc6-e6ba-4ba3-ac44-f30fbd883985</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-30</displayx>
<displayy>105</displayy>
<displaywidth>10</displaywidth>
<displayheight>10</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<onsuccess>61054d12-d1ec-4503-b7fd-b7f06ccd89b2</onsuccess>
</stage>
<stage stageid="bd05318f-bf24-42e1-9572-d933297eb0e5" name="Populate CollFields" type="Action">
<subsheetid>0a5dffc6-e6ba-4ba3-ac44-f30fbd883985</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-120</displayx>
<displayy>60</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<inputs>
<input type="collection" name="Main Collection" narrative="The collection to append to." expr="[CollFields]" />
<input type="collection" name="Collection to Append" narrative="The collection to append." expr="[_CollFields]" />
</inputs>
<outputs>
<output type="collection" name="Combined Collection" narrative="The combined collection." stage="CollFields" />
</outputs>
<onsuccess>cc58f710-4b5c-43a9-bda2-2c4d13ae596a</onsuccess>
<resource object="Utility - Collection Manipulation" action="Append Rows to Collection" />
</stage>
<stage stageid="ea93bfd5-233a-4bea-8556-98cb31854457" name="_CollFields" type="Collection">
<subsheetid>0a5dffc6-e6ba-4ba3-ac44-f30fbd883985</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-195</displayx>
<displayy>-15</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<datatype>collection</datatype>
<private />
<alwaysinit />
<collectioninfo>
<field name="Field" type="text" namespace="" />
</collectioninfo>
<initialvalue>
<row>
<field name="Field" type="text" value="FileLeafRef" />
</row>
<row>
<field name="Field" type="text" value="FileRef" />
</row>
<row>
<field name="Field" type="text" value="Modified" />
</row>
<row>
<field name="Field" type="text" value="Editor" />
</row>
<row>
<field name="Field" type="text" value="Author" />
</row>
<row>
<field name="Field" type="text" value="Processed" />
</row>
<row>
<field name="Field" type="text" value="Choice" />
</row>
<row>
<field name="Field" type="text" value="ChoiceMul" />
</row>
<row>
<field name="Field" type="text" value="AAA" />
</row>
<row>
<field name="Field" type="text" value="AAA_x003a_Title" />
</row>
<row>
<field name="Field" type="text" value="AAAMul" />
</row>
<row>
<field name="Field" type="text" value="AAAMul_x003a_Title" />
</row>
</initialvalue>
</stage>
<stage stageid="53dc3be4-f424-4ea7-b217-997d35c3e3f7" name="ValueSeparator" type="Data">
<loginhibit />
<narrative>For multiple value columns, what separator to used when joining into a string</narrative>
<displayx>90</displayx>
<displayy>-45</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<datatype>text</datatype>
<initialvalue xml:space="preserve">|</initialvalue>
<alwaysinit />
</stage>
<stage stageid="5d29a68a-fb8d-4e25-8c03-7a4aa394c7b9" name="SetValueSeparator" type="SubSheetInfo">
<subsheetid>2a3e1401-a8c5-466e-b212-8dd69c5d8598</subsheetid>
<narrative>For multiple value columns, what separator to used when joining into a string</narrative>
<displayx>-30</displayx>
<displayy>-165</displayy>
<displaywidth>150</displaywidth>
<displayheight>60</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
</stage>
<stage stageid="961bcbc7-73ba-4043-8ed0-6f574ce94b17" name="Start" type="Start">
<subsheetid>2a3e1401-a8c5-466e-b212-8dd69c5d8598</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>15</displayx>
<displayy>-105</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<inputs>
<input type="text" name="ValueSeparator" narrative="For multiple value columns, what separator to used when joining into a string" stage="ValueSeparator" />
</inputs>
<onsuccess>fc1c42af-decb-43b2-85fd-f4570cd81a2c</onsuccess>
</stage>
<stage stageid="fc1c42af-decb-43b2-85fd-f4570cd81a2c" name="End" type="End">
<subsheetid>2a3e1401-a8c5-466e-b212-8dd69c5d8598</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>15</displayx>
<displayy>-60</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
</stage>
<stage stageid="743568fd-df14-4843-9f43-94c0a4539f07" name="UpdateItem" type="SubSheetInfo">
<subsheetid>e2236adf-cf27-4590-a6bc-bcaaabb74e43</subsheetid>
<narrative>update a ListItem. For lookup and user fields, pass the Id.
Unable to handle Multiset fields</narrative>
<displayx>-15</displayx>
<displayy>-165</displayy>
<displaywidth>120</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
</stage>
<stage stageid="6383912c-0797-498b-8666-bfd2d11113e6" name="Start" type="Start">
<subsheetid>e2236adf-cf27-4590-a6bc-bcaaabb74e43</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>15</displayx>
<displayy>-105</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<inputs>
<input type="number" name="ItemId" narrative="The Item Id to update" stage="ItemId" />
<input type="text" name="ListName" narrative="The list the item belong to" stage="ListName" />
<input type="collection" name="CollUpdates" narrative="a key-value pairing of fields to update" stage="CollUpdates" />
</inputs>
<onsuccess>85b72a28-b5f4-489c-b20b-9ee742ea1e59</onsuccess>
</stage>
<stage stageid="3933029d-b983-4a45-803f-623da7f4a905" name="ItemId" type="Data">
<subsheetid>e2236adf-cf27-4590-a6bc-bcaaabb74e43</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-120</displayx>
<displayy>-105</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<datatype>number</datatype>
<initialvalue />
<private />
<alwaysinit />
</stage>
<stage stageid="9d251449-a222-4db4-9fa8-27a7cc2980cf" name="Input" type="Block">
<subsheetid>e2236adf-cf27-4590-a6bc-bcaaabb74e43</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-225</displayx>
<displayy>-135</displayy>
<displaywidth>195</displaywidth>
<displayheight>60</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="7FB2E5" />
</stage>
<stage stageid="219e80be-b969-493a-8cb0-ce41cb0bfb0d" name="CollUpdates" type="Collection">
<subsheetid>e2236adf-cf27-4590-a6bc-bcaaabb74e43</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-180</displayx>
<displayy>-105</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<datatype>collection</datatype>
<private />
<alwaysinit />
<collectioninfo>
<field name="Key" type="text" namespace="" description="the column name" />
<field name="Value" type="text" namespace="" description="the new value" />
</collectioninfo>
</stage>
<stage stageid="d70d9925-8693-4185-98b9-787a2462f353" name="SP UpdateItem" type="Code">
<subsheetid>e2236adf-cf27-4590-a6bc-bcaaabb74e43</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>15</displayx>
<displayy>105</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<inputs>
<input type="flag" name="IsDebug" expr="[Debug]" />
<input type="text" name="listName" expr="[ListName]" />
<input type="number" name="itemId" expr="[ItemId]" />
<input type="collection" name="updates" expr="[CollUpdates]" />
</inputs>
<onsuccess>55f101e0-e5fd-4c13-991a-4d704ec83108</onsuccess>
<code><![CDATA[// get item
var list = SPCtx.Web.Lists.GetByTitle(listName);
var item = list.GetItemById(Convert.ToInt32(itemId));
// set fields
foreach (DataRow dr in updates.Rows)
item[dr["Key"] as string] = dr["Value"];
// update!
item.Update();]]></code>
</stage>
<stage stageid="5ea9a035-9910-48ea-860e-eb7ae5d10767" name="RunInPlace" type="Data">
<subsheetid>e2236adf-cf27-4590-a6bc-bcaaabb74e43</subsheetid>
<loginhibit />
<narrative>are you just running this Page? then enable this to debug and clean up!</narrative>
<displayx>-150</displayx>
<displayy>-30</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<datatype>flag</datatype>
<initialvalue>False</initialvalue>
<private />
<alwaysinit />
</stage>
<stage stageid="85b72a28-b5f4-489c-b20b-9ee742ea1e59" name="RunInPlace" type="Decision">
<subsheetid>e2236adf-cf27-4590-a6bc-bcaaabb74e43</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>15</displayx>
<displayy>-30</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<decision expression="[RunInPlace]" />
<ontrue>915ed7ff-fdd9-4b4b-8cdb-1c544c009311</ontrue>
<onfalse>d70d9925-8693-4185-98b9-787a2462f353</onfalse>
</stage>
<stage stageid="502bddab-4eb8-4958-a097-bf18f154712e" name="Set Debug" type="MultipleCalculation">
<subsheetid>e2236adf-cf27-4590-a6bc-bcaaabb74e43</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-75</displayx>
<displayy>15</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<onsuccess>1a175549-7eb9-4dc1-aa5d-b04bd14b8665</onsuccess>
<steps>
<calculation expression="True" stage="Debug" />
<calculation expression="&quot;https://my/sharepoint/site/&quot;" stage="SiteUrl" />
<calculation expression="&quot;username&quot;" stage="Username" />
<calculation expression="&quot;My List&quot;" stage="ListName" />
<calculation expression="1" stage="ItemId" />
</steps>
</stage>
<stage stageid="1a175549-7eb9-4dc1-aa5d-b04bd14b8665" name="Sign In" type="SubSheet">
<subsheetid>e2236adf-cf27-4590-a6bc-bcaaabb74e43</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-75</displayx>
<displayy>60</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<inputs>
<input type="text" name="SiteUrl" narrative="The SharePoint site's base url" expr="[SiteUrl]" />
<input type="text" name="Username" narrative="The user's email" expr="[Username]" />
<input type="password" name="Password" narrative="The user's password" expr="[_Password]" />
</inputs>
<onsuccess>7e6386d8-7bf3-49ad-90e4-5452c60a2149</onsuccess>
<processid>8abede7e-97d7-4b0b-9789-c05efc93e747</processid>
</stage>
<stage stageid="e2c5a36e-ad13-494e-9915-34d42451986c" name="_Password" type="Data">
<subsheetid>e2236adf-cf27-4590-a6bc-bcaaabb74e43</subsheetid>
<loginhibit />
<narrative>set the password for debugging - when RunInPlace is true</narrative>
<displayx>-150</displayx>
<displayy>0</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<datatype>password</datatype>
<initialvalueenc>
</initialvalueenc>
<private />
<alwaysinit />
</stage>
<stage stageid="e4d0d17a-29d9-4a68-9684-c5b09753663b" name="RUN IN PLACE" type="Block">
<subsheetid>e2236adf-cf27-4590-a6bc-bcaaabb74e43</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-195</displayx>
<displayy>-60</displayy>
<displaywidth>165</displaywidth>
<displayheight>210</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="FF0000" />
</stage>
<stage stageid="915ed7ff-fdd9-4b4b-8cdb-1c544c009311" name="Init" type="SubSheet">
<subsheetid>e2236adf-cf27-4590-a6bc-bcaaabb74e43</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-75</displayx>
<displayy>-30</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<onsuccess>502bddab-4eb8-4958-a097-bf18f154712e</onsuccess>
<processid>b3a13010-3579-4fec-9263-e6b4a8978ee3</processid>
</stage>
<stage stageid="4c451c84-a200-4c25-b672-3c7cb06774c8" name="End" type="End">
<subsheetid>e2236adf-cf27-4590-a6bc-bcaaabb74e43</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>15</displayx>
<displayy>270</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
</stage>
<stage stageid="4c239a47-6695-4286-886e-217741f929b6" name="RunInPlace" type="Decision">
<subsheetid>e2236adf-cf27-4590-a6bc-bcaaabb74e43</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>15</displayx>
<displayy>195</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<decision expression="[RunInPlace]" />
<ontrue>5bc84c39-87d5-4ce1-adc3-a89a29b49355</ontrue>
<onfalse>4c451c84-a200-4c25-b672-3c7cb06774c8</onfalse>
</stage>
<stage stageid="8942833b-0a03-4f88-b68f-fb24ccdd2638" name="Success" type="Block">
<subsheetid>e2236adf-cf27-4590-a6bc-bcaaabb74e43</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-30</displayx>
<displayy>165</displayy>
<displaywidth>180</displaywidth>
<displayheight>135</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="7FB2E5" />
</stage>
<stage stageid="5bc84c39-87d5-4ce1-adc3-a89a29b49355" name="Dispose" type="SubSheet">
<subsheetid>e2236adf-cf27-4590-a6bc-bcaaabb74e43</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>105</displayx>
<displayy>195</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<onsuccess>4c451c84-a200-4c25-b672-3c7cb06774c8</onsuccess>
<processid>13ea01fb-3d78-45c7-a9c6-02c57acb36a2</processid>
</stage>
<stage stageid="55f101e0-e5fd-4c13-991a-4d704ec83108" name="TryExecute" type="SubSheet">
<subsheetid>e2236adf-cf27-4590-a6bc-bcaaabb74e43</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>105</displayx>
<displayy>105</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<onsuccess>af60095e-27b1-4cb3-9d5f-4292af715652</onsuccess>
<processid>9c323c5b-a1a8-4436-8283-a21b2323687f</processid>
</stage>
<stage stageid="70e3a065-89d6-4c2c-bae5-41f0fb24e068" name="TryExecute - clean up" type="Block">
<subsheetid>e2236adf-cf27-4590-a6bc-bcaaabb74e43</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>60</displayx>
<displayy>75</displayy>
<displaywidth>165</displaywidth>
<displayheight>60</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="FFFF00" />
</stage>
<stage stageid="44128f9a-be58-4c18-bffb-e3755bd1c71a" name="Failed" type="Block">
<subsheetid>e2236adf-cf27-4590-a6bc-bcaaabb74e43</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>240</displayx>
<displayy>75</displayy>
<displaywidth>165</displaywidth>
<displayheight>105</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="7FB2E5" />
</stage>
<stage stageid="ea31e5f3-55fc-4fd2-bc79-b15483cd5865" name="re-throw" type="Exception">
<subsheetid>e2236adf-cf27-4590-a6bc-bcaaabb74e43</subsheetid>
<narrative>
</narrative>
<displayx>285</displayx>
<displayy>150</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<exception type="System Exception" detail="" usecurrent="yes" />
</stage>
<stage stageid="23997285-56b4-4b52-b51e-3802f67b3d98" name="RunInPlace" type="Decision">
<subsheetid>e2236adf-cf27-4590-a6bc-bcaaabb74e43</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>285</displayx>
<displayy>105</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<decision expression="[RunInPlace]" />
<ontrue>f4c4762e-a24a-4454-a5b9-d117ed013224</ontrue>
<onfalse>ea31e5f3-55fc-4fd2-bc79-b15483cd5865</onfalse>
</stage>
<stage stageid="f4c4762e-a24a-4454-a5b9-d117ed013224" name="Dispose" type="SubSheet">
<subsheetid>e2236adf-cf27-4590-a6bc-bcaaabb74e43</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>360</displayx>
<displayy>105</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<onsuccess>ea31e5f3-55fc-4fd2-bc79-b15483cd5865</onsuccess>
<processid>13ea01fb-3d78-45c7-a9c6-02c57acb36a2</processid>
</stage>
<stage stageid="b6d924f9-86b0-4645-9de8-703123a49734" name="RecoverEx" type="Recover">
<subsheetid>e2236adf-cf27-4590-a6bc-bcaaabb74e43</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>180</displayx>
<displayy>105</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<onsuccess>23997285-56b4-4b52-b51e-3802f67b3d98</onsuccess>
</stage>
<stage stageid="af60095e-27b1-4cb3-9d5f-4292af715652" name="Anchor4" type="Anchor">
<subsheetid>e2236adf-cf27-4590-a6bc-bcaaabb74e43</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>105</displayx>
<displayy>150</displayy>
<displaywidth>10</displaywidth>
<displayheight>10</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<onsuccess>48d927d0-f80b-43d1-9642-f871a1ab0b81</onsuccess>
</stage>
<stage stageid="48d927d0-f80b-43d1-9642-f871a1ab0b81" name="Anchor10" type="Anchor">
<subsheetid>e2236adf-cf27-4590-a6bc-bcaaabb74e43</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>15</displayx>
<displayy>150</displayy>
<displaywidth>10</displaywidth>
<displayheight>10</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<onsuccess>4c239a47-6695-4286-886e-217741f929b6</onsuccess>
</stage>
<stage stageid="7e6386d8-7bf3-49ad-90e4-5452c60a2149" name="Populate CollUpdates" type="Action">
<subsheetid>e2236adf-cf27-4590-a6bc-bcaaabb74e43</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-75</displayx>
<displayy>105</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<inputs>
<input type="collection" name="Main Collection" narrative="The collection to append to." expr="[CollUpdates]" />
<input type="collection" name="Collection to Append" narrative="The collection to append." expr="[_CollUpdates]" />
</inputs>
<outputs>
<output type="collection" name="Combined Collection" narrative="The combined collection." stage="CollUpdates" />
</outputs>
<onsuccess>d70d9925-8693-4185-98b9-787a2462f353</onsuccess>
<resource object="Utility - Collection Manipulation" action="Append Rows to Collection" />
</stage>
<stage stageid="9f5e7e5d-2da3-4b31-8e02-6620e65e539b" name="_CollUpdates" type="Collection">
<subsheetid>e2236adf-cf27-4590-a6bc-bcaaabb74e43</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-150</displayx>
<displayy>30</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<datatype>collection</datatype>
<private />
<alwaysinit />
<collectioninfo>
<field name="Key" type="text" namespace="" />
<field name="Value" type="text" namespace="" />
</collectioninfo>
<initialvalue>
<row>
<field name="Key" type="text" value="Processed" />
<field name="Value" type="text" value="1" />
</row>
<row>
<field name="Key" type="text" value="ProcessedTSP" />
<field name="Value" type="text" value="2018-07-27T08:00:00Z" />
</row>
<row>
<field name="Key" type="text" value="Error" />
<field name="Value" type="text" value="" />
</row>
</initialvalue>
</stage>
<stage stageid="951eb7af-934b-4d66-b39c-b208c5b7aaa0" name="ListName" type="Data">
<subsheetid>e2236adf-cf27-4590-a6bc-bcaaabb74e43</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-75</displayx>
<displayy>-105</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<datatype>text</datatype>
<initialvalue />
<private />
<alwaysinit />
</stage>
<stage stageid="16a82254-921d-4271-a67e-f8bd68190835" name="DownloadFile" type="SubSheetInfo">
<subsheetid>42fe214f-9024-4732-bf44-0f2fa58c322c</subsheetid>
<narrative>download file from site</narrative>
<displayx>-15</displayx>
<displayy>-180</displayy>
<displaywidth>120</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
</stage>
<stage stageid="6a8b993d-5ab6-442f-857f-4d03ccdcd808" name="Start" type="Start">
<subsheetid>42fe214f-9024-4732-bf44-0f2fa58c322c</subsheetid>
<loginhibit />
<narrative>download a file from a SharePoint site</narrative>
<displayx>15</displayx>
<displayy>-120</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<inputs>
<input type="text" name="FileRef" narrative="The items relative file location on SharePoint (field [FileRef] for Document lists)" stage="FileRef" />
<input type="text" name="Location" narrative="file or folder path to save the file to" stage="Location" />
</inputs>
<onsuccess>2483d96d-98b9-4535-81f7-f56b7edfddae</onsuccess>
</stage>
<stage stageid="3209a19c-a324-448c-b21f-16c9f67a7af3" name="SP DownloadFile" type="Code">
<subsheetid>42fe214f-9024-4732-bf44-0f2fa58c322c</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>105</displayx>
<displayy>45</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<inputs>
<input type="flag" name="IsDebug" expr="[Debug]" />
<input type="text" name="fileRef" expr="[FileRef]" />
<input type="text" name="location" expr="[Location]" />
</inputs>
<onsuccess>54cc3774-caa9-411f-a6f1-f651067576d1</onsuccess>
<code><![CDATA[// get file extension
var fileExt = System.IO.Path.GetExtension(fileRef);
// determine destination, either directory or file
if (System.IO.Directory.Exists(location))
// must be dir, add fileRef name
location = System.IO.Path.Combine(location,System.IO.Path.GetFileName(fileRef));
// must be a file, ensure extension
else if (!location.EndsWith(fileExt, StringComparison.CurrentCultureIgnoreCase))
location += fileExt;
// get file info
var fileInfo = File.OpenBinaryDirect(SPCtx, fileRef);
// open destination file, and go!
using (var fileStream = System.IO.File.Create(location))
fileInfo.Stream.CopyTo(fileStream);]]></code>
</stage>
<stage stageid="73660b8c-de8c-442c-a4e3-6a598d798a3f" name="RunInPlace" type="Data">
<subsheetid>42fe214f-9024-4732-bf44-0f2fa58c322c</subsheetid>
<loginhibit />
<narrative>are you just running this Page? then enable this to debug and clean up!</narrative>
<displayx>-150</displayx>
<displayy>-45</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<datatype>flag</datatype>
<initialvalue>False</initialvalue>
<private />
<alwaysinit />
</stage>
<stage stageid="2483d96d-98b9-4535-81f7-f56b7edfddae" name="RunInPlace" type="Decision">
<subsheetid>42fe214f-9024-4732-bf44-0f2fa58c322c</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>15</displayx>
<displayy>-45</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<decision expression="[RunInPlace]" />
<ontrue>4f1923d8-a528-43b6-8611-fb5f6f7d0b50</ontrue>
<onfalse>d040a5d5-b145-4a17-9d26-72a534d52c41</onfalse>
</stage>
<stage stageid="e7e55fe4-eb23-47ee-ac6c-0336e81e034b" name="Set Debug" type="MultipleCalculation">
<subsheetid>42fe214f-9024-4732-bf44-0f2fa58c322c</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-75</displayx>
<displayy>0</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<onsuccess>31647467-25a6-4771-a541-ccae55483d26</onsuccess>
<steps>
<calculation expression="True" stage="Debug" />
<calculation expression="&quot;https://my/sharepoint/site/&quot;" stage="SiteUrl" />
<calculation expression="&quot;username&quot;" stage="Username" />
<calculation expression="&quot;/document/FileRef/field.extension&quot;" stage="FileRef" />
<calculation expression="&quot;C:\save\folder&quot;" stage="Location" />
</steps>
</stage>
<stage stageid="31647467-25a6-4771-a541-ccae55483d26" name="Sign In" type="SubSheet">
<subsheetid>42fe214f-9024-4732-bf44-0f2fa58c322c</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-75</displayx>
<displayy>45</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<inputs>
<input type="text" name="SiteUrl" narrative="The SharePoint site's base url" expr="[SiteUrl]" />
<input type="text" name="Username" narrative="The user's email" expr="[Username]" />
<input type="password" name="Password" narrative="The user's password" expr="[_Password]" />
</inputs>
<onsuccess>d040a5d5-b145-4a17-9d26-72a534d52c41</onsuccess>
<processid>8abede7e-97d7-4b0b-9789-c05efc93e747</processid>
</stage>
<stage stageid="01a71020-5281-458b-a487-d3e084f4256e" name="_Password" type="Data">
<subsheetid>42fe214f-9024-4732-bf44-0f2fa58c322c</subsheetid>
<loginhibit />
<narrative>set the password for debugging - when RunInPlace is true</narrative>
<displayx>-150</displayx>
<displayy>-15</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<datatype>password</datatype>
<initialvalueenc>
</initialvalueenc>
<private />
<alwaysinit />
</stage>
<stage stageid="92523592-966f-4fbe-8946-9f6759215063" name="RUN IN PLACE" type="Block">
<subsheetid>42fe214f-9024-4732-bf44-0f2fa58c322c</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-195</displayx>
<displayy>-75</displayy>
<displaywidth>165</displaywidth>
<displayheight>150</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="FF0000" />
</stage>
<stage stageid="4f1923d8-a528-43b6-8611-fb5f6f7d0b50" name="Init" type="SubSheet">
<subsheetid>42fe214f-9024-4732-bf44-0f2fa58c322c</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-75</displayx>
<displayy>-45</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<onsuccess>e7e55fe4-eb23-47ee-ac6c-0336e81e034b</onsuccess>
<processid>b3a13010-3579-4fec-9263-e6b4a8978ee3</processid>
</stage>
<stage stageid="2d30ad7c-2c64-4383-b5f7-4a054ba46966" name="End" type="End">
<subsheetid>42fe214f-9024-4732-bf44-0f2fa58c322c</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>15</displayx>
<displayy>210</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
</stage>
<stage stageid="560a01e4-a99e-4a16-a079-ce46d9ccfbae" name="RunInPlace" type="Decision">
<subsheetid>42fe214f-9024-4732-bf44-0f2fa58c322c</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>15</displayx>
<displayy>135</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<decision expression="[RunInPlace]" />
<ontrue>0e533381-7639-4c2f-b54c-f5be59ee3568</ontrue>
<onfalse>2d30ad7c-2c64-4383-b5f7-4a054ba46966</onfalse>
</stage>
<stage stageid="681eaf64-e8fb-4498-ae61-5823259b838f" name="Success" type="Block">
<subsheetid>42fe214f-9024-4732-bf44-0f2fa58c322c</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-30</displayx>
<displayy>105</displayy>
<displaywidth>180</displaywidth>
<displayheight>135</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="7FB2E5" />
</stage>
<stage stageid="0e533381-7639-4c2f-b54c-f5be59ee3568" name="Dispose" type="SubSheet">
<subsheetid>42fe214f-9024-4732-bf44-0f2fa58c322c</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>105</displayx>
<displayy>135</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<onsuccess>2d30ad7c-2c64-4383-b5f7-4a054ba46966</onsuccess>
<processid>13ea01fb-3d78-45c7-a9c6-02c57acb36a2</processid>
</stage>
<stage stageid="d083bbcb-ab07-4b87-a2b5-614b64a8bd70" name="TryDownload - clean up" type="Block">
<subsheetid>42fe214f-9024-4732-bf44-0f2fa58c322c</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>60</displayx>
<displayy>15</displayy>
<displaywidth>165</displaywidth>
<displayheight>60</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="FFFF00" />
</stage>
<stage stageid="4f6ec6af-2253-4c94-bbeb-0acb55cfac88" name="Failed" type="Block">
<subsheetid>42fe214f-9024-4732-bf44-0f2fa58c322c</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>240</displayx>
<displayy>15</displayy>
<displaywidth>165</displaywidth>
<displayheight>105</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="7FB2E5" />
</stage>
<stage stageid="ab8b58a1-987a-49a3-9bdc-71065d6c62d1" name="re-throw" type="Exception">
<subsheetid>42fe214f-9024-4732-bf44-0f2fa58c322c</subsheetid>
<narrative>
</narrative>
<displayx>285</displayx>
<displayy>90</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<exception type="System Exception" detail="" usecurrent="yes" />
</stage>
<stage stageid="f435df4a-d134-4e76-a9c6-fcae9362ebcb" name="RunInPlace" type="Decision">
<subsheetid>42fe214f-9024-4732-bf44-0f2fa58c322c</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>285</displayx>
<displayy>45</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<decision expression="[RunInPlace]" />
<ontrue>6c44d6c8-c7ac-4c37-b062-3c6f4e50da60</ontrue>
<onfalse>ab8b58a1-987a-49a3-9bdc-71065d6c62d1</onfalse>
</stage>
<stage stageid="6c44d6c8-c7ac-4c37-b062-3c6f4e50da60" name="Dispose" type="SubSheet">
<subsheetid>42fe214f-9024-4732-bf44-0f2fa58c322c</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>360</displayx>
<displayy>45</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<onsuccess>ab8b58a1-987a-49a3-9bdc-71065d6c62d1</onsuccess>
<processid>13ea01fb-3d78-45c7-a9c6-02c57acb36a2</processid>
</stage>
<stage stageid="e642741b-c278-4e9d-95d0-291d86418909" name="RecoverEx" type="Recover">
<subsheetid>42fe214f-9024-4732-bf44-0f2fa58c322c</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>180</displayx>
<displayy>45</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<onsuccess>f435df4a-d134-4e76-a9c6-fcae9362ebcb</onsuccess>
</stage>
<stage stageid="54cc3774-caa9-411f-a6f1-f651067576d1" name="Anchor4" type="Anchor">
<subsheetid>42fe214f-9024-4732-bf44-0f2fa58c322c</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>105</displayx>
<displayy>90</displayy>
<displaywidth>10</displaywidth>
<displayheight>10</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<onsuccess>2694962d-aea9-417b-b9bb-d9266aba367b</onsuccess>
</stage>
<stage stageid="2694962d-aea9-417b-b9bb-d9266aba367b" name="Anchor10" type="Anchor">
<subsheetid>42fe214f-9024-4732-bf44-0f2fa58c322c</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>15</displayx>
<displayy>90</displayy>
<displaywidth>10</displaywidth>
<displayheight>10</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<onsuccess>560a01e4-a99e-4a16-a079-ce46d9ccfbae</onsuccess>
</stage>
<stage stageid="89a2bd6d-e0ff-4dd2-b5ab-dcb6586ceed5" name="Location" type="Data">
<subsheetid>42fe214f-9024-4732-bf44-0f2fa58c322c</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-135</displayx>
<displayy>-120</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<datatype>text</datatype>
<initialvalue />
<private />
<alwaysinit />
</stage>
<stage stageid="cac4cc42-f96b-4ad8-a903-f54eb5a5d83e" name="Input" type="Block">
<subsheetid>42fe214f-9024-4732-bf44-0f2fa58c322c</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-180</displayx>
<displayy>-150</displayy>
<displaywidth>150</displaywidth>
<displayheight>60</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="7FB2E5" />
</stage>
<stage stageid="c69e7ec8-51e2-42fa-bf22-bab1e64d948d" name="FileRef" type="Data">
<subsheetid>42fe214f-9024-4732-bf44-0f2fa58c322c</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>-75</displayx>
<displayy>-120</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<datatype>text</datatype>
<initialvalue />
<private />
<alwaysinit />
</stage>
<stage stageid="d040a5d5-b145-4a17-9d26-72a534d52c41" name="Anchor5" type="Anchor">
<subsheetid>42fe214f-9024-4732-bf44-0f2fa58c322c</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>15</displayx>
<displayy>45</displayy>
<displaywidth>10</displaywidth>
<displayheight>10</displayheight>
<font family="Segoe UI" size="10" style="Regular" color="000000" />
<onsuccess>3209a19c-a324-448c-b21f-16c9f67a7af3</onsuccess>
</stage>
</process>
@owns
Copy link
Author

owns commented Jul 30, 2018

Using the Source

You can download the source at GitHubGist, but you'll need to change a few things.

Reference CSOM DLLs

You'll need to add 2 DLLs (Microsoft.SharePoint.Client.Runtime.dll and Microsoft.SharePoint.Client.dll). You can download these 2 from nuget.org packages, either Microsoft.SharePoint2013.CSOM or Microsoft.SharePointOnline.CSOM depending on your site and DLLs depending on your .Net Framework version. For me, I used SharePoint2013 and .Net4.0.
You can test the DLs are working by using a simple PowerShell script I posted to GitHubGist
There are 2 ways to update the references for the Blue Prism object:

  • Edit the source XML before importing. Update the below lines to the correct paths​
    XML:
<reference>\\MY\PATH\Microsoft.SharePoint.Client.Runtime.dll</reference>
<reference>\\MY\PATH\Microsoft.SharePoint.Client.dll</reference>
  • Import the object and in the first page, "Initialization", edit the Code Options -> External References​

Testing

Each public action (TryExecuteQuery, Sign In, GetItems, UpdateItem, and DownloadFile) has a "RUN IN PLACE" section. You'll need to set each data input inside the block and edit the Multi Calc "Set Debug" with your test values. Then, set "RunInPlace" to True and Start!
JUST MAKE SURE YOU SET "RunInPlace" TO False BEFORE YOU SAVE!!!

A Few Improvement Ideas

  • Action "Sign In" using ExecuteQuery to confirm the login was successful. However, this is not necessary. Instead, you can remove that and have the first real action (i.e. GetItems) called by a process be the first to call ExecuteQuery. This may lead to some confusing Exceptions, and a minimal performance improvement. So I opted to have "Sign In" exception mean the site or login are bad.
  • When ExecuteQuery fails, action TryExecuteQuery just keeps trying even if the error is something trying again isn't going to fix - i.e. List does NOT exist. You can improve this by only continue to try for specific exceptions (e.g. "The remote server returned an error: (503) Server Unavailable.")
  • TryExecuteQuery tracks how long ExecuteQuery takes to complete. You could track this or just remove the unnecessary code.
  • UpdateItem is very basic. All values must be passed as a string.
    • DateTimes should be in UTC format - e.g. 2018-07-27T08:00:00Z
    • For Lookup or Person columns, you'll need to pass the Item's Id.
    • Multi-Value columns CANNOT be updated in this implementation.
  • Calling UpdateItem for multiple edits will be SLOW. Instead, you should add an UpdateItems action to update multiple items in a list, where each row in CollUpdates would be changes for an item, with columns "Id", "Field1", "Field2", ..., "FieldN".
  • Action "DownloadFile" is very basic. The location is created or overwritten. You can optional add an Overwrite flag or automatically append " (2)".
  • Testing is handled by having a "RunInPlace" section in each action. You could separate the code out by create a private "TEST " for each.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment