Nested worker extensions

Aug 17, 2010 at 1:07 PM
Edited Aug 17, 2010 at 1:30 PM

Hi, I have a situation with nested worker extensions. E.g.

[XcoWorkerExtension]
public class CheckPassword { ... }
[XcoWorkerExtension]
public class Authenticate 
{
 public CheckPassword cp = new CheckPassword();
}
public class FinalWorker
{
  public Authenticate a = new Authenticate();
  ...
}

The current wiring behavior in the framework does not detect the nested extension (CheckPassword) if the second extension is included in the final worker. I even tried decorating the field again with the XcoWorkerExtension attribute. So I modify the code myself (Get_worker_extension_objects) to move up the inheritance tree. Is it possible to change the behavior to handle nested extensions? That way, I do not need to mod the code every time, and I think, nested workers are a fairly common pattern.

Thank you, Willie

Coordinator
Aug 18, 2010 at 10:32 AM

Hi Willie,

We didn't think about that before, but I agree with you that nested worker extensions seem like a good pattern. We'll probably add a support for it soon.

Thomas

Coordinator
Aug 23, 2010 at 11:28 AM

Hi Willie,

The nested worker extensions functionality is now implemented.
Note that, if you are using optional message types in your worker extensions, the outermost worker extension attribute defines for all nested extensions what is optional and what is required. E.g. in your example if the CheckPasswd extension had processing mthod that should be optional, the Authenticate extension would also need to define it as optional. Otherwise it would no more be possible to change optional/required from outside as soon as nesting is involved.

Thomas

Aug 23, 2010 at 2:30 PM

Hi Thomas,

Thank you. I'll use it and give some feedback if needed.

Willie