Error when publishing WF containing custom code activity to workflow manager 1.0

Hello:
Workflow manager sounds every exciting to me, I am trying it out to see if it will work for me.
I downloaded "CustomCodeActivitySample" of workflow manager 1.0, and when I ran, I got following exception:
Workflow XAML failed validation due to the following errors:
Cannot create unknown type '{clr-namespace:HashActivity;assembly=HashActivity}ComputeHash'. HTTP headers received from the server - ActivityId: 2a1e4d9d-90bd-4f59-a1fc-d3673194dd54. NodeId: NDL0714. Scope: /CustomCodeActivitiesSample. Client ActivityId : 235d66c1-bbe6-4982-8242-833a6bc1f6b1.
more details:
Microsoft.Workflow.Client.ActivityValidationException was unhandled
  HResult=-2146233088
  Message=Workflow XAML failed validation due to the following errors:
Cannot create unknown type '{clr-namespace:HashActivity;assembly=HashActivity}ComputeHash'. HTTP headers received from the server - ActivityId: efe2c3cb-e6fd-4124-88a1-6c8e72aecb06. NodeId: NDL0714. Scope: /CustomCodeActivitiesSample. Client ActivityId : 73d7b773-be53-4a7b-b2d8-ba687e60a4f4.
  Source=Microsoft.Workflow.Client
  ActivityName=ProcessMovies
  ScopePath=/CustomCodeActivitiesSample
  StackTrace:
       at Microsoft.Workflow.Client.ClientHelpers.SendRequest[T](HttpWebRequest request, T content)
       at Microsoft.Workflow.Client.WorkflowManagementClient.SendRequest[T](HttpWebRequest request, T content)
       at Microsoft.Workflow.Client.ActivityManager.Publish(ActivityDescription description, Boolean overwriteXClassName, Boolean terminateDependentInstances)
       at Microsoft.Workflow.Client.ActivityManager.Publish(ActivityDescription description)
       at Microsoft.Workflow.Samples.Common.WorkflowManagementClientExtensions.PublishWorkflow(WorkflowManagementClient client, String workflowName, String xamlFilePath, Collection`1 externalVariables, IDictionary`2 configValues,
SubscriptionFilter activationFilter) in c:\WFM_C\C\Microsoft.Workflow.Samples.Common\WorkflowManagementClientExtensions.cs:line 45
       at Microsoft.Workflow.Samples.Common.WorkflowManagementClientExtensions.PublishWorkflow(WorkflowManagementClient client, String workflowName, String xamlFilePath, SubscriptionFilter activationFilter) in c:\WFM_C\C\Microsoft.Workflow.Samples.Common\WorkflowManagementClientExtensions.cs:line
29
       at CustomCodeActivitySample.Program.Main(String[] args) in c:\WFM_C\C\CustomCodeActivitySample\Program.cs:line 39
       at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException: System.Net.WebException
       HResult=-2146233079
       Message=The remote server returned an error: (400) Bad Request.
       Source=Microsoft.Workflow.Common
       StackTrace:
            at Microsoft.Workflow.Common.AsyncResult.End[TAsyncResult](IAsyncResult result)
            at Microsoft.Workflow.Client.HttpGetResponseAsyncResult`1.End(IAsyncResult result)
            at Microsoft.Workflow.Client.ClientHelpers.SendRequest[T](HttpWebRequest request, T content)
       InnerException:
Thanks
ahorse

Hi
We had to update following in assemblyinfo.cs file.
assembly: XmlnsDefinition("wf://workflow.windows.net/$Current/$Activities", "YourProjectNamespace")]
to 
assembly: XmlnsDefinition("wf://{WorkflowManagerServerName}:12291/$Current/$Activities", "YourProjectNamespace")]for e.g.assembly: XmlnsDefinition("wf://workflowmanagerserver:12291/$Current/$Activities", "YourProjectNamespace")]
Only then custom code activity started working. However, this means, when we want to deploy in other environment with different URL, we need to re-build the assembly. 
Is there any way by which we have this configurable?
Regards,
RK
Radhakrishna

Similar Messages

  • PublishWorkflow error when workflow contains custom code activity

    I've failed to get a custom code activity working within Workflow Manager 1.0 even though I believe I've performed all of the guidance steps provided.
    As other posts, I get the usual 'cannot create unknown type' error:
    client.PublishWorkflow( workflowName, @"..\..\TestWorkflow.xaml" );->
    Cannot create unknown type '{wf://workflow.windows.net/$Current/$Activities}SendMailActivity'.
    The activity is implemented as:
    namespace SharedActivities
    public sealed class SendMailActivity : CodeActivity
    I've created an AllowedTypes.xml file containing the following:
    <?xml version="1.0" encoding="utf-8" ?>
    <AllowedTypes>
    <Assembly Name="SharedActivities">
    <Namespace Name="SharedActivities">
    <Type>SendMailActivity</Type>
    </Namespace>
    </Assembly>
    </AllowedTypes>
    The SharedActivities assembly has the following Post Build event command line
    net stop "Workflow Manager Backend"
    %systemroot%\system32\inetsrv\appcmd stop apppool /apppool.name:"WorkflowMgmtPool"
    xcopy /y "$(TargetPath)" "C:\Program Files\Workflow Manager\1.0\Workflow\WFWebRoot\bin"
    xcopy /y "$(TargetPath)" "C:\Program Files\Workflow Manager\1.0\Workflow\Artifacts"
    copy /y $(ProjectDir)AllowedTypes.xml "C:\Program Files\Workflow Manager\1.0\Workflow\WFWebRoot\bin"
    copy /y $(ProjectDir)AllowedTypes.xml "C:\Program Files\Workflow Manager\1.0\Workflow\Artifacts"
    %systemroot%\system32\inetsrv\appcmd start apppool /apppool.name:"WorkflowMgmtPool"
    net start "Workflow Manager Backend"Execution output : 1>------ Rebuild All started: Project: SharedActivities, Configuration: Debug Any CPU ------
    1>  SharedActivities -> D:\Dev\Prototypes\WorkflowTest\SharedActivities\bin\Debug\SharedActivities.dll
    1>  The Workflow Manager Backend service is stopping.......
    1>  The Workflow Manager Backend service was stopped successfully.
    1>  
    1>  "WorkflowMgmtPool" successfully stopped
    1>  D:\Dev\Prototypes\WorkflowTest\SharedActivities\bin\Debug\SharedActivities.dll
    1>  1 File(s) copied
    1>  D:\Dev\Prototypes\WorkflowTest\SharedActivities\bin\Debug\SharedActivities.dll
    1>  1 File(s) copied
    1>          1 file(s) copied.
    1>          1 file(s) copied.
    1>  "WorkflowMgmtPool" successfully started.
    1>  The Workflow Manager Backend service is starting.
    1>  The Workflow Manager Backend service was started successfully.
    1>  
    ========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========
    The assembly containing the custom activity is loaded into the Workflow host process.
    I've configured my machine (development) to allow unsafe types.
    I've also
    uploaded my project so you can verify the implementation.
    Thanks in advance, Adam

    I did following step in your VS project.
    Remove SendMailActivity from TestWorkflow.Xaml
    Commented out "[assembly: XmlnsDefinition("wf://workflow.windows.net/$Current/$Activities", "SharedActivities")]
    " line from SharedActivities assemblyInfo.cs file
    build the project
    Added SendMailActivity activity in TestWorkflow.xaml
    run the program.
    Above steps seems to be working for me..

  • SSRS VB Code error while deploying report -- There is an error on line 5 of custom code: [BC30201] Expression expected._

    Function MakeList(ByVal items As Object()) As String
        If items Is Nothing Then
          Return Nothing
    END if 
    Dim builder As System.Text.StringBuilder = 
          New System.Text.StringBuilder()
          builder.Append("<div>")
       For Each item As Object In items
          builder.Append("<div <ul>")
          builder.Append(item)
          builder.Append("</ul>")
       Next
       builder.Append("</div>")
       Return builder.ToString()
    End Function
    Function Length(ByVal items as Object()) as Integer
       If items is Nothing Then
          Return 0
       End If
       Return items.Length
    End Function

    Hi Wintersbay,
    According to your description, when you use the custom code in SSRS report, you got the error message.
    To solve the problem, please refer to the custom code below:
    Function MakeList(ByVal items As Object) As String
    If items Is Nothing Then
    Return Nothing
    END if
    Dim builder As System.Text.StringBuilder =
    New System.Text.StringBuilder()
    builder.Append("<div>")
    For Each item As Object In items
    builder.Append("<div <ul>")
    builder.Append(item)
    builder.Append("</ul>")
    Next
    builder.Append("</div>")
    Return builder.ToString()
    End Function
    Function Length(ByVal items as Object) as Integer
    If items is Nothing Then
    Return 0
    End If
    Return items.Length
    End Function
    If you have any more questions, please feel free to ask.
    Thanks,
    Wendy Fu
    Wendy Fu
    TechNet Community Support

  • Window error when publishing Muse change, can't pubish page update

    Window error when publishing Muse change, can't pubish page update. Any suggestions?
    It happens after I updated my website payment page with a new Paypal html. That html is below with x's put in to the code. Why doesn't Muse or Windows like this code in Muse?
    <script type="text/javascript" data-pp-pubid="9xxxxx6cec" data-pp-placementtype="540x200"> (function (d, t) {
    "use strict";
    var s = d.getElementsByTagName(t)[0], n = d.createElement(t);
    n.src = "//paypal.adtag.where.com/merchant.js";
    s.parentNode.insertBefore(n, s);
    }(document, "script"));
    </script>

    Window error when publishing Muse change, can't pubish page update. Any suggestions?
    It happens after I updated my website payment page with a new Paypal html. That html is below with x's put in to the code. Why doesn't Muse or Windows like this code in Muse?
    <script type="text/javascript" data-pp-pubid="9xxxxx6cec" data-pp-placementtype="540x200"> (function (d, t) {
    "use strict";
    var s = d.getElementsByTagName(t)[0], n = d.createElement(t);
    n.src = "//paypal.adtag.where.com/merchant.js";
    s.parentNode.insertBefore(n, s);
    }(document, "script"));
    </script>

  • Java Error When Publishing

    So I have an applicational prototype that I need to have out by the end of the day today, and all of a sudden Flash Catalyst states that the project cannot be published due to an error. It also said to check the Code view to see what's wrong. Yesterday it did say that the error was a "Java Heap Space" error, but today there is absolutely nothing in the problems listing even though it still outputs that there's an error when publishing the project.
    The prototype builds and runs in the browser just fine, but it's publishing that becomes the problem. I am not a Flex developer by any means, but as a user experience designer, I understand how to edit some of the coding, so if anyone could shed some light on this, I will do my best to fix the problem with any solutions that will work.
    I appreciate the help guys!
    -- Rick

    To the original poster, Rick:
    If you're seeing a "Java Heap Space" error message, this is a (not very user-friendly) way of the program telling you it's running out of memory.  Catalyst tries to detect and warn you when your project is getting too large, but it's not always perfect.
    Did you see any warnings about the size of the images you've imported into your project?  Very large images can certianly be one source of problems.
    Here are a few tips for dealing with large images:
    Resize them to be smaller using a another app like Photoshop, before you import into Catalyst.  Shoot for a file size of 100-300 KB at the most, for very large "gallery"-style photos.  Other images should be < 100 KB (remember, people viewing your site will have to download all this).
    In Catalyst, when you're done shrinking down an image to the right size, choose Optimize Artwork > Rasterize in the heads-up display to "lock in" the smaller size.
    In Catalyst, choose Optimize Artwork > Convert to Linked Image for any especially large photos.  This can speed up the initial load time of your site, and it will also help avoid memory problems when publishing.
    Hope that helps!
    - Peter

  • WorkFlow Error when publishing

    Hello, 
    I am having errors publishing workflows. This was working and all of a sudden stopped. From the error message I am taking it as a permissions issue? 
    Here is the code it spits out: 
    System.InvalidOperationException: Operation failed with error System.UnauthorizedAccessException: Attempted to perform an unauthorized operation.
    at Microsoft.SharePoint.SPAppPrincipalManager.GetManager(SPWeb web)
    at Microsoft.SharePoint.WorkflowServices.SPWebWorkflowSecurityContext.EnsureAppPrincipal(SPWeb elevatedWeb)
    at Microsoft.SharePoint.WorkflowServices.SPWebWorkflowSecurityContext.<SetupApplicationEcosystem>b__3()
    at Microsoft.SharePoint.SPSecurity.<>c__DisplayClass5.<Run
    Anyone have any thoughts? This happens with all sorts of workflows, even basic ones as shown in the above example!
    Thanks,
    Will 

    Hi,
    For your issue, Re-register the workflow service using command:
    Register-SPWorkflowService -SPSite 'https://myhost/mysite' -WorkflowHostUri 'https://workflowhost' -AllowOAuthHttp -Force
    Reopened SharePoint Designer again and test again.
    Here are similar posts, you can use as a reference:
    https://social.technet.microsoft.com/Forums/en-US/61b2cfad-355d-4a43-8dd6-7d6813cd1b2f/sharepointdesigner-error-when-publishing-a-workflow?forum=sharepointcustomizationprevious
    http://sp2013.pro/2013/04/solution-errors-were-found-when-compiling-the-workflow-the-workflow-files-were-saved-but-cannot-be-run-cannot-set-unknown-member/
    Best Regards,
    Lisa Chen
    Lisa Chen
    TechNet Community Support

  • SharePointDesigner - Error when publishing a workflow

    Hi.
    When i´m publishing my workflow, sharepoint designer rises the following exception:
    "Error were found when compiling the workflow. The workflow files were saved but cannot be run." - "Unexpected error on server associating the workflow."
    The workflow is really simple; i used some custom activities (to read details from an attached excel document) and then i have to do many checks and about 12 approvals.
    I have recreated the workflow and it seems that adding the 7th approval creates this error; when publishing with 6 approvals everything is fine.
    My Question: What is the error, where can i find more information regarding this issue, maybe it´s a bug in designer? Are there any known workarounds that can help? I really need so many approvals :-)
    Is there a way to split the workflow in 2 or 3 parts, that can do the "job" of the big one?
    I´m using Sharepoint Server 2010 with the current SPD (-> Microsoft Information Worker VM).
    Thx for help

    I finally found a solution how to solve this issue:
    In the web.config file of the current site collection (where i was publishing my workflow) i have appended a timeoutvalue for my requests:
    Old entry: <httpRuntime maxRequestLength="51200"/>
    New entry: <httpRuntime
    maxRequestLength="51200"
    executionTimeout="300"
    />
    This will give my workflow some more time to publish!
    Source: http://www.manjuke.com/2011/05/fixed-sharepoint-designer-error.html

  • Publishing error when publishing one section

    I am publishing my material per module and receive the following error when publishing one of the modules:
    Publishing Activity Log:
    Task
    GMT Training Guide / Creating numbering styles in document
    Path
    /49b77e2d-7666-443e-a2fa-edbfc9aa22b2/Parts/pr.oxmlprint.multi.xml     
    Comment
    Processing project failed
    Ref. #
    -1673847682
    All of the other modules publish with no problems.
    Any assistance in this regard would be much appreciated.
    Thanks,
    Angie

    Did you copy the text in there? Could be the following:
    The problem is related to concept frames. Some concept frames have not regular charachters. Those characters aren't visible in the edit mode. The are only visible if you copy the text of the concept frame to word. In word use the button "display unknow characters". It seemed like they will appear if you copy and paste text in the conceptframes.
    You need to copy the text of the editor to Word. Click on the button "display unknown characters" to see all characters in text (including e.g.enter and spacebar). Remove the strange characters such as small circles. Copy the text and paste it back into the editor.
    Save the editor (and publish again).
    Good luck.

  • 404 error when publishing to FTP server.

    I'm getting the 404 error when publishing my iWeb site to my FTP server.  Please help.
    It says I have a good connection and publishes but then I get the error when I "Click to go to the site."  I've read where I have to upload the file to my server but with the file index_html.  Do I rename my iWeb file, domain, to index_html?

    I'm getting the 404 error when publishing my iWeb site to my FTP server.  Please help.
    It says I have a good connection and publishes but then I get the error when I "Click to go to the site."
    A 404 errors means the file is not on the server.
    Checking the connection is just testing the FTP connection.
    I've read where I have to upload the file to my server but with the file index_html.  Do I rename my iWeb file, domain, to index_html?
    Do I rename my iWeb file, domain, to index_html?
    No, you don't. The domain file is where iWeb  stores its assets. It stays on your computer. It has no meaning outside it. iWeb publishes the index.html file and all the other files.
    Read this : The concept of iWeb Sites
    So if your pages do not load, check for their presence on the server.

  • Error when opening table container file keydb read only

    Hi Guys,
    We are installing solution manager 4.0 on windows/sql but we are getting following error and couldnt continue the installation
    FKD-00070  Error when opening table container file C:\PROGRA1\SAPINS1\SOLMAN\SYSTEM\MSS\CENTRAL\AS\keydb.xml for writing. Possible reason: "read-only"
    ERROR 2008-06-04 20:10:56.843
    FKD-00049  XML - Parser error: error: no DTD specified, can't validate in line 1, 1
    in file C:\Program Files\sapinst_instdir\SOLMAN\SYSTEM\MSS\CENTRAL\AS\keydb.xml.
    Please help
    Regards,
    Santosh

    Further info
    keydb.xml is empty and the directory has got write access for everyone
    regards
    Edited by: Santosh Keerti on Jun 4, 2008 1:29 PM

  • Error when publishing to file

    i keep getting "an unknown error" when publishing to file or publishing all to mobileme...
    It still works if i just publish to mobileme.
    Any ideas?
    Im trying to get my site going on go daddy, and kinda really need it in a folder...

    If you are still getting the error then its likely that you have a corrupt domain file.
    To prove this, quit iWeb, create a new folder on your desktop and drag your domain file out of - Home Folder/Library/Application Support/iWeb - into this.
    Relaunch iWeb to force it to create a new domain file, add some content and try publishing to a folder.
    If this works, your original file is corrupt.

  • Adobe Captivate 6 Error when publishing

    Help!  I having trouble publishing a training that my employees can view.  When they open the project they are getting the first image here that is essentially blank.  I have attempted to reduce the size and save to different folders etc. but nothing seems to work. 

    Hi there,
    Could you tell me the complete version of Captivate (Help > About Adobe Captivate).  6.0.1.240
    Which version of Adobe Reader or Acrobat are they using?  Adobe Reader XI
    Can you publish this locally on your system (not to network drive directly), check force republish option also, and are you able to view it on your end?  I can pull up the file from my computer that is saved in the same drive that the agents are attempting to pull up.  But, I am not sure if it is viewing for me because I have it on my system.
    Re: Adobe Captivate 6 Error when publishing
    created by Varun Kalra<http://forums.adobe.com/people/Varun+Kalra> in Adobe Captivate - View the full discussion<http://forums.adobe.com/message/5855412#5855412

  • Custom code activity - Could not find type in assembly

    I've searched through but cannot find an adequate answer.
    Im trying to create a code activity for a Sharepoint 2013 workflow.
    I have created the code activity, the workflow and add the custom code activity to it.
    As soon as i hit "Build" the code activity disappears from Toolbox and i get the "Could not find type ... in assembly ..."
    Any idea how to solve this?
    Thanks in advance

    For sharepoint 2013 , try to install workflowmanager 1.0 and workflowclient to create workflow, they will work better
    Hi Inderjeet, thanks for your reply. These are already installed

  • When closing firefox 4, it remains active on task manager..

    when closing firefox 4, it remains active on task manager and cannot open firefox again unless i go to task manager and terminate the process. with older version of firefox, had no problem.

    See "Hang at exit":
    * http://kb.mozillazine.org/Firefox_hangs
    * [[Firefox hangs]]

  • Duplicate Object Name Error When Publishing Crystal Reports from BW to BOE

    Hi,
    We recently upgraded our systems (all client and server) to SP2.7 in order to solve a problem with saving Crystal Reports to BW.  Now we are experiencing a new error when trying to publish a Crystal Report from BW to BOE (either all in one step from Crystal Reports application or directly from within BW).
    Upon trying to publish a Crystal Report from BW to BOE, we get the following error:
    "An error occurred while saving and / or publishing.  The return code 1 was returned from the server.  Logon to Crystal Enterprise failed.  Unable to commit the changes to Enterprise.  Reason: Failed to commit objects to server : Duplicate object name in the same folder."
    We have repeated this issue numerous time with different reports, users and logon credentials and have verified that there are NOT any duplicate object names.
    Additionally, in some cases, the report ultimately publishes to BOE, but with the above error interruption along the way.
    Any ideas?
    Thanks,
    Josh
    Edited by: Josh Crawford on May 10, 2010 9:46 AM

    Ingo,
    Apologies for the delayed response.  We've spent a few days poking around with this issue, and had even opened a customer message for it (13641).
    In the end, it seems that the problem was somehow associated with the "Prepare this report for translation." flag in the "Save to BW Options" dialog box of Crystal Reports.  If we try to Save & Publish with the Translation flag selected, we get the duplicate entry error.  If we Save & Publish without the Translation flag selected, everything is fine.
    There are still some details we need to look into, but for the time being it looks like we don't have an issue anymore(assuming we ever did) as we're not concerned with Translation capabilities.
    If we come across the problem again, I'll post again.
    Thanks,
    Josh

Maybe you are looking for

  • There was a problem connecting to the server ... OS 10.8.4 + WD NAS

    Dear all, first my configuration: iMac from mid 2012, MacOS X Mountain Lion, 10.8.4, iPhoto 09 v. 8.1.2 - all software updates done and up-to-date MacBook Pro late 2011, MacOS X Mountain Lion, 10.8.4 NAS WD My Book World Edition II (white light), 2 x

  • Template to open multiple service requests

    I have the following requirement to achieve with service manager... I wish to open a new Service request or incident from HR for a new starter, This SR or incident then needs to open templeted sub activites of build machine, assign phone extension, c

  • How can I allocate data in multiple PDF pages?

    Dear Forum, I have a PDF file with a couple of attached PDF files in it. Some data of the the upper most file needs to be written also in some fields of the attached files which are forms as well. I can't get it done just by writing and reading globa

  • Reg language settings while browsing EBS

    Hi, Language - Greek / Portuguese / Spanish The "Lightweight MLS" is implemented in the R12.1.3 application and we have Greek, Spanish and Portuguese as languages. We have also run the TLS (Language Synchronisation) scripts and we are able to see the

  • 5d MarkII RAW- unsupported image format?

    I've seen the topic on bad RAW conversion into Aperture from the current Canon 5d MkII model - but I can't even view my images any larger than thumbnail-sized. When I click on them it says "unsupported image format", double clicking sets the thumbnai