Something goes wrong when I edit an exisiting Custom Workflow from GUI
Hello,
I need to create some custom activity to manipulate Attribute Value, so I start by creating the Request Logging custom Activity and added it to FIM. I added too the really good Powershell Activity wrote by Carol 'MissMiis' Wapsphere that I have translate
in C# for the occasion.
I succeed to understand after several attempt how Custom Activities work (well understand enough for my need in a first time), so after tested the logging avtivity I just create a new one to format attribute name.
I added to the portal, and unfortunately have got an error in my workflow. So I need to debug it.
But the strangest things is that I cannot anymore edit the workflow activity from the Portal GUI. The portal fire a "Unable to process your request" error when I hit the Activities tab.
I obtain this error for Logging Activity and my own Activity, but not with Powershell Activity !!!
I double and triple checked the configuration and the activities code source but cannot found any explanation to that behaviour.
So,
Question 1 : How can I debug custom activity calling to understand what it happens ?
Question 2 : Does anybody already have this behaviour and manage to correct this ?
Thanks for the help
Fabrice
October 21st, 2010 10:48am
i will try to keep the answer short...
when you say writing a custom activity, you are really writing two things
1. the actual Workflow Activity
2. a class for the workflow designer (*SettingsPart)
the way it works is that when you configure the workflow using the designer from the portal, if u choose to add/remove/edit an activity definition, your workflow designer (#2) will be invoked. e.g. if you are adding a new activity, your *SettingsPart at
some point will return the activity. FIMPortal will serialize the activity into XOML (XML) and store it in the DB.
My guess is that something wrong happens in the serialization/deserialization of the XOML
>>But the strangest things is that I cannot anymore edit the workflow activity from the Portal GUI. The portal fire a "Unable to process your request" error when I hit the Activities tab.
i bet you can view it in Advance View. if yes, go to Extended attribute, find the XOML and see if u notice anything special there
Free Windows Admin Tool Kit Click here and download it now
October 21st, 2010 11:56am
this is a good link to talk about enabling Portal stacktrace
http://setspn.blogspot.com/2010/06/fim-2010-enable-advanced-error-logging.html
if u want more info, read my blog at
http://blogs.technet.com/b/aho/archive/2010/09/29/troubleshooting-fimservice-fimportal-password-reset-client.aspx
October 21st, 2010 11:57am
Tony,
here is the XOML data
<ns0:SequentialWorkflow x:Name="SequentialWorkflow" ActorId="00000000-0000-0000-0000-000000000000" WorkflowDefinitionId="00000000-0000-0000-0000-000000000000" RequestId="00000000-0000-0000-0000-000000000000" TargetId="00000000-0000-0000-0000-000000000000" xmlns:ns1="clr-namespace:FIM.CustomWorkflowActivitiesLibrary.Activities;Assembly=LoggingActivitiesLibrary, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f79caf7d9dbefe5c" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/workflow" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:ns0="clr-namespace:Microsoft.ResourceManagement.Workflow.Activities;Assembly=Microsoft.ResourceManagement, Version=4.0.2592.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<ns1:RequestLoggingActivity x:Name="authenticationGateActivity1" ReadCurrentRequestActivity_CurrentRequest="{x:Null}" LogFileName="RequestLoggingActivity.log" LogFilePath="C:\_data\FIM2010\Log" />
</ns0:SequentialWorkflow>
I figure there is something wrong with as I manage to view the XOML in Advanced View, and the Loggin Activity is Working, but I can figure out what
The things weird is that I only have the error as soon I want to edit the Activities, not when I create it the first time
Fabrice
Free Windows Admin Tool Kit Click here and download it now
October 21st, 2010 12:09pm
Resolved !
In fact I just used the useful How To guide from:
http://msdn.microsoft.com/en-us/library/ff859524.aspx
But.....
If you look wisely the source code of the RequestLoggingActivitySettingPart.cs file you will notice this:
public override void LoadActivitySettings(Activity activity)
{
throw new NotImplementedException();
}
Basically, this throw an Exception when loading properties of the Activity in the GUI ;)
So we need to implement the LoadActivitySettings method with this code:
/// <summary>
/// Load the activity settings.
/// </summary>
public override void LoadActivitySettings(Activity activity)
{
RequestLoggingActivity RequestLoggingActivity = (RequestLoggingActivity)activity;
if (RequestLoggingActivity != null)
{
this.SetText("txtLogFilePath", RequestLoggingActivity.LogFilePath);
this.SetText("txtLogFileName", RequestLoggingActivity.LogFileName);
}
}
Rebuild, and it's works !
Thank you for the help nTony ;)
Fabrice
October 21st, 2010 12:35pm