Skip to main content

Import Xaml Text into Workflow

Comments

17 comments

  • Ryan Kelley

    Just copy the text into a text file and save as a .xaml. You can view this file then in Workflow Designer.

    0
  • Ryan Kelley

    I meant to say copy it into Notepad

    0
  • Permanently deleted user

    I tried that, but the workflow software didn't want to recognize the file.

    Walter

    0
  • Permanently deleted user

    It may be that the workflow posted in the forums was created in a newer version of workflow designer than the one you have installed.  If you upgrade to the latest version that might help.

    0
  • Permanently deleted user

    Thank you for your responses.

    I'll see what version we're on and find out whether we're going to upgrade soon.

    Walter

    0
  • Permanently deleted user

    I'm currently running Workflow Designer v 2.19.1.7 and my Report Designer is the same.

    Walter

    0
  • Permanently deleted user

    Hi Walter

    and now the bid question is what version was the xaml written with which will need to be answered by the originator of the xaml.

    Regards

    Ralph

    0
  • Permanently deleted user

    Thanks for bringing that up Ralph. How do you tell by just looking at the xaml text off the forums?

    Maybe, as a prerequisite to the posting, it would be a good idea to show which version the file is in.

    Walter

     

     

    0
  • Permanently deleted user

    Hi Walter

    it is not hugely obvious but I assume that there is validation of the referenced namespaces etc at the start of the xaml which is what then gives the error.

    Unfortunately there is nothing that says Workflow Designer version 2.x of whatever.

    Unless the person who has posted has specified what they were using then you may need to give them a prompt. Since new Activities arrive pretty much every version there is always a chance that if you are slow to upgrade then you will get these issues.

    It is a good idea to specify versions which I try to do but don't always manage to remember to do so.

    Regards

    Ralph

    0
  • Permanently deleted user

    Good points Ralph. Will try to quote versions when I post.

    Thanks for your help.

    Walter

    0
  • Permanently deleted user

    Downloaded the .exe for both the Workflow Designer and the Report Designer this morning and it seems that this new download is older

    than the version I'm running now...? Right now I'm running WF v2.19.1.7 and RD v2.19.1.7, but the newly downloaded files are

    WF v2.19.0.390 and RD v2.19.0.390?

    So, if I'm running the lastest sofware, why then I cannot paste in the xaml text from a forum posting into a text file and give it an extension of .xaml, but then

    the WF won't read the file?

    Walter

    0
  • Permanently deleted user

    Hi Walter,

    Sometimes I have to open Workflow Designer first, then use the File -> Open menu and open the XAML file that way.   For whatever reason, I sometimes get an error just relying on the file association I set up for the XAML extension.

    Are you receiving a specific error message when yours fails?

    Steve

     

     

     

    0
  • Permanently deleted user

    Steve,

    No particular error, just that it cannot open the file. I'll check my file associations and try your recommendations on opening these types of .xaml text files.

    Walter

    0
  • Permanently deleted user

    Hi Walter

    would you like to post the xaml that you are trying to use and I can try to open it.

    Ralph

    0
  • Permanently deleted user

    Ralph,

    Here are the contents of the forum post I was trying to import. All I did was paste the portion below into a text file and called it paste.xaml. There were no extra spaces at the beginning or end of the file. So it starts with <Activity and then ends with </Activity>5

     

    <Activity mc:Ignorable="sap sads" x:Class="{x:Null}" sap:VirtualizedContainerService.HintSize="326,1218" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces"

     

     xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities"

     

     xmlns:eac="clr-namespace:ESRI.ArcGIS.Client;assembly=ESRI.ArcGIS.Client"

     

     xmlns:eacg="clr-namespace:ESRI.ArcGIS.Client.Geometry;assembly=ESRI.ArcGIS.Client"

     

     xmlns:eact="clr-namespace:ESRI.ArcGIS.Client.Tasks;assembly=ESRI.ArcGIS.Client"

     

     xmlns:gce="clr-namespace:Geocortex.Core.Extensions;assembly=Geocortex.Core"

     

     xmlns:gfc="clr-namespace:Geocortex.Forms.Client;assembly=Geocortex.EssentialsWpfApi"

     

     xmlns:gfci="clr-namespace:Geocortex.Forms.Client.Items;assembly=Geocortex.EssentialsWpfApi"

     

     xmlns:gr="clr-namespace:Geocortex.Reporting;assembly=Geocortex.Reporting"

     

     xmlns:gwa="clr-namespace:Geocortex.Workflow.Activities;assembly=Geocortex.Workflow"

     

     xmlns:gwa1="clr-namespace:Geocortex.Workflow.Activities;assembly=Geocortex.Workflow.Activities"

     

     xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"

     

     xmlns:mva="clr-namespace:Microsoft.VisualBasic.Activities;assembly=System.Activities"

     

     xmlns:s="clr-namespace:System;assembly=System.Core"

     

     xmlns:s1="clr-namespace:System;assembly=System"

     

     xmlns:s2="clr-namespace:System;assembly=mscorlib"

     

     xmlns:sa="clr-namespace:System.Activities;assembly=System.Activities"

     

     xmlns:sads="http://schemas.microsoft.com/netfx/2010/xaml/activities/debugger"

     

     xmlns:sap="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation"

     

     xmlns:scg="clr-namespace:System.Collections.Generic;assembly=mscorlib"

     

     xmlns:sd="clr-namespace:System.Data;assembly=System.Data"

     

     xmlns:sl="clr-namespace:System.Linq;assembly=System.Core"

     

     xmlns:sxs="clr-namespace:System.Xml.Serialization;assembly=System.Xml"

     

     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

     

      <Sequence DisplayName="DataTable Stuff" sap:VirtualizedContainerService.HintSize="286,1138" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces">

     

        <Sequence.Variables>

     

          <Variable x:TypeArguments="x:String" Name="display" />

     

        </Sequence.Variables>

     

        <sap:WorkflowViewStateService.ViewState>

     

          <scg:Dictionary x:TypeArguments="x:String, x:Object">

     

            <x:Boolean x:Key="IsExpanded">True</x:Boolean>

     

          </scg:Dictionary>

     

        </sap:WorkflowViewStateService.ViewState>

     

        <Sequence DisplayName="Keep datatables consealed" sap:VirtualizedContainerService.HintSize="264,888">

     

          <Sequence.Variables>

     

            <Variable x:TypeArguments="sd:DataTable" Default="[new datatable(&quot;test&quot;)]" Name="dt" />

     

          </Sequence.Variables>

     

          <sap:WorkflowViewStateService.ViewState>

     

            <scg:Dictionary x:TypeArguments="x:String, x:Object">

     

              <x:Boolean x:Key="IsExpanded">True</x:Boolean>

     

            </scg:Dictionary>

     

          </sap:WorkflowViewStateService.ViewState>

     

          <InvokeMethod DisplayName="Add Column 1" sap:VirtualizedContainerService.HintSize="242,128" MethodName="Add">

     

            <InvokeMethod.TargetObject>

     

              <InArgument x:TypeArguments="sd:DataColumnCollection">[dt.Columns]</InArgument>

     

            </InvokeMethod.TargetObject>

     

            <InArgument x:TypeArguments="x:String">ColumnName1</InArgument>

     

          </InvokeMethod>

     

          <InvokeMethod DisplayName="Add Column 2" sap:VirtualizedContainerService.HintSize="242,128" MethodName="Add">

     

            <InvokeMethod.TargetObject>

     

              <InArgument x:TypeArguments="sd:DataColumnCollection">[dt.Columns]</InArgument>

     

            </InvokeMethod.TargetObject>

     

            <InArgument x:TypeArguments="x:String">ColumnName2</InArgument>

     

          </InvokeMethod>

     

          <InvokeMethod DisplayName="Add Row" sap:VirtualizedContainerService.HintSize="242,128" MethodName="Add">

     

            <InvokeMethod.TargetObject>

     

              <InArgument x:TypeArguments="sd:DataRowCollection">[dt.Rows]</InArgument>

     

            </InvokeMethod.TargetObject>

     

          </InvokeMethod>

     

          <Assign DisplayName="Add Data to row (0) col(0)" sap:VirtualizedContainerService.HintSize="242,60">

     

            <Assign.To>

     

              <OutArgument x:TypeArguments="x:Object">[dt.Rows(0).Item("ColumnName1")]</OutArgument>

     

            </Assign.To>

     

            <Assign.Value>

     

              <InArgument x:TypeArguments="x:Object">["Programming"]</InArgument>

     

            </Assign.Value>

     

          </Assign>

     

          <Assign DisplayName="Add Data to row (0) col(1)" sap:VirtualizedContainerService.HintSize="242,60">

     

            <Assign.To>

     

              <OutArgument x:TypeArguments="x:Object">[dt.Rows(0).Item("ColumnName2")]</OutArgument>

     

            </Assign.To>

     

            <Assign.Value>

     

              <InArgument x:TypeArguments="x:Object">["DataTables"]</InArgument>

     

            </Assign.Value>

     

          </Assign>

     

          <Assign sap:VirtualizedContainerService.HintSize="242,60">

     

            <Assign.To>

     

              <OutArgument x:TypeArguments="x:String">[display]</OutArgument>

     

            </Assign.To>

     

            <Assign.Value>

     

              <InArgument x:TypeArguments="x:String">[dt.Rows(0).Item("ColumnName1").ToString() + " " + dt.Rows(0).Item(1).ToString()]</InArgument>

     

            </Assign.Value>

     

          </Assign>

     

        </Sequence>

     

        <gwa1:Alert sap:VirtualizedContainerService.HintSize="264,86" Text="[display]" Title="DataTable Data" />

     

      </Sequence>

     

    </Activity>5/16/2013 8:30:57 AM

     

     
    0
  • Permanently deleted user

    Hi Walter

    it would appear that you are breaking it by including the 5 after the closing Activity element.

    It opens fine on my machine using Workflow Designer 2.19.0.390

    Regards

    Ralph

    0
  • Permanently deleted user

    Ralph,

    Thank you so much for your assistance.  I am now able to read in the textual .xaml files as predicted.

    Walter

    0

Please sign in to leave a comment.