none
Customizing Workflow hosted control RRS feed

  • Question

  •  

    Hi,

    I am trying out some customization of the Workflow Hosted control. I am making changes to the Microsoft.Ccf.Samples.WfWorkflowControl project given in the agent desktop. I hope that is the project I need to work on. This project has a user control called WfWorkflowControl.cs but this user control is implementing the class Workflow, whereas in the configuration the type is given as the Microsoft.Ccf.Samples.WfWorkflowControl.WfWorkflowControl instead of Microsoft.Ccf.Samples.WfWorkflowControl.Workflow. I am not finding the type Microsoft.Ccf.Samples.WfWorkflowControl.WfWorkflowControl in the dll(used Disassembler).Any changes I am making in the usercontrol is not getting reflected, also it is not hitting any break point. I am totally confused. Can anyone help me in understanding the basic architecture of the workflow implementation in CCF?

     

    One more thing......if I change the name of the application from Workflow to WorkflowCustom, the application cease to work.I think the application name is hardcoded somewhere........is it in the database?....kindly let me know..

    Wednesday, February 27, 2008 7:06 AM

Answers

  • Hi, the control you need to customize is in fact WfWorkflowControl. It is implementing the interface IWorkFlow (not the class Workflow as you said).

     

    Just to be sure, the class definition is the following:

     

    Code Snippet

    namespace Microsoft.Ccf.Samples.WfWorkflowControl
    {
     ///
     /// Summary description for WfWorkflowControl.
     ///
     // There was a request from Herb to divorce WfWorkflowControl from IWorkFlow.
     // There are two reasons this is currently a problem:
     // 1.) AgentDesktop does not support DoAction so eventing cannot be done
     // 2.) AgentDesktop hands its sessions over to WfWorkflowControl via the IWorkFlow property SessionManager
     public partial class WfWorkflowControl : HostedControl, Microsoft.Ccf.Samples.HostedControlInterfaces.IWorkFlow
     {

    ...
    }

     

     

    The name of the hosted application is hardcoded as you said in the Desktop class:

     

    Code Snippet
    workFlowControl = (IWorkFlow)this.GetHostedApp("Workflow");

     

     

     

    Hope this helps,

    Sole

    Wednesday, February 27, 2008 11:59 AM

All replies

  • Hi, the control you need to customize is in fact WfWorkflowControl. It is implementing the interface IWorkFlow (not the class Workflow as you said).

     

    Just to be sure, the class definition is the following:

     

    Code Snippet

    namespace Microsoft.Ccf.Samples.WfWorkflowControl
    {
     ///
     /// Summary description for WfWorkflowControl.
     ///
     // There was a request from Herb to divorce WfWorkflowControl from IWorkFlow.
     // There are two reasons this is currently a problem:
     // 1.) AgentDesktop does not support DoAction so eventing cannot be done
     // 2.) AgentDesktop hands its sessions over to WfWorkflowControl via the IWorkFlow property SessionManager
     public partial class WfWorkflowControl : HostedControl, Microsoft.Ccf.Samples.HostedControlInterfaces.IWorkFlow
     {

    ...
    }

     

     

    The name of the hosted application is hardcoded as you said in the Desktop class:

     

    Code Snippet
    workFlowControl = (IWorkFlow)this.GetHostedApp("Workflow");

     

     

     

    Hope this helps,

    Sole

    Wednesday, February 27, 2008 11:59 AM
  • Hi Sole,

    Thanks a lot. Now I have been able to call me Workflow application by making changes in the line:

    workFlowControl = (IWorkFlow)this.GetHostedApp("Workflow"); to

    workFlowControl = (IWorkFlow)this.GetHostedApp("Deb_Workflow");

    Now it is working. But I am facing a strange error. It is working when I have both the controls "Workflow" and "Deb_Workflow" hosted inside CCF. The moment I am disabling "Workflow" it is throwing up an error saying

    Error: Hosted Application "Deb_Workflow" could not be created. Contact the CCF administrator.

    Object reference not set to an instance of an object.

     

    I tried to debug and the error is thrown at given line in the Desktop.cs class. I think there is hardcoding done in this method too.....and I dont think we have the source code for that. Any idea???

    // Calling the modified LoadApplication method of ApplicationHost so that

    // only the global applications are loaded in case of a global session and

    // non-global applications are loaded depending on workflow status for normal

    // session.

    appHost.LoadApplications(null, sessionName == null, workflowExists);

     

     

    There is one more issue:

    Any change I am making to the WfWorkflowControl user control does not get reflected. It is not even hitting any breakpoint when I am trying to debug.

    Configuration done :

    URI: D:\Program Files\Microsoft CCF 2008\Source Code\Microsoft.Ccf.Samples.Csr.AgentDesktop\Microsoft.Ccf.Samples\Csr\WfWorkflowControl\bin\Debug\Microsoft.Ccf.Samples.WfWorkflowControl.dll

    Type: Microsoft.Ccf.Samples.WfWorkflowControl.WfWorkflowControl.

    I have done my installation in D:\Program Files\Microsoft CCF 2008.

    Any idea why this is happenning? Kindly help!!!

     

    Thursday, February 28, 2008 4:51 AM
  • My problem is resolved. It was namespace conflict. Thanks a lot.

    Thursday, February 28, 2008 10:43 AM