Workflow and ServiceDesk Community

 View Only

Workflow - Component - Developer Guide - Inspecting 

Nov 09, 2016 05:54 PM

In this Article I'm going to explain how to inspect other Components.

Table of Contents

 

This is a great way to learn how something is done if there isn't documentation or guides you can follow. Dissecting code is a useful skill to obtain.

There are a number of decompilers available, two of which I use are

Lately I've been favouring JustDecompile over dotPeek but try them out and see which you prefer, or comment below on any others you use and your experience.

For an example we will look at the Add New Data Element, this has a checkbox for Is Array.

The Component Class Name is

LogicBase.Components.Default.Process.InsertDataComponent

So we need to find this DLL.

Open the WF install location and search for

LogicBase.Components.Default*.dll

And it's in

E:\Program Files\Symantec\Workflow\Shared\Components

Copy this to your dev folder. I like to create a folder with WF version numbers.

We need to find the 'InsertDataComponent' under 'Process'.

JustDecompile - LogicBase.Components.Default.png

Now look for the IsArray information.

So we have a declaration.

private bool _array;

Next the Getter/Setter

[HideIfPropertyNull("DataType")]
[PropertyIndex(2)]
[RefreshProperties(RefreshProperties.All)]
public bool IsArray
{
    get
    {
        return this._array;
    }
    set
    {
        if (this._array != value)
        {
            this._array = value;
            this.CreateValue();
            this.IsValid(true);
        }
    }
}

Then the methods

ReadFromStream

this._array = info.GetBoolean("isArray");

If we compare this to how I did it in the Checkbox article, this way is more succinct.

this._addSpace = (bool)info.GetValue("_addSpace", typeof(bool), (object)false);

WriteToStream

info.AddValue("isArray", this._array);

We can take what we've learnt here and use it in future components.

 

Protirus.png

Statistics
0 Favorited
1 Views
0 Files
0 Shares
0 Downloads

Tags and Keywords

Related Entries and Links

No Related Resource entered.