02.05.2014 Views

Ocean* Application Development Framework - Ocean - Schlumberger

Ocean* Application Development Framework - Ocean - Schlumberger

Ocean* Application Development Framework - Ocean - Schlumberger

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Custom Worksteps<br />

You can use this class directly and create one instance for each of your arguments.<br />

class Args : IDescribedArgumentsSource<br />

{<br />

MyArgClass o;<br />

...<br />

public DescribedArgument[] DescribedArguments<br />

{<br />

{<br />

DescribedArgument arg1 =<br />

new DescribedArgument(<br />

o.first.Name, o.first.Description, ArgumentRole.In);<br />

..<br />

}<br />

}<br />

}<br />

...<br />

// allocate an array and load the objects<br />

// return the array<br />

You can also create a custom derived type and override the protected properties if<br />

you cannot easily create the object via the constructors.<br />

class MyDescribedArgs : DescribedArgument<br />

{<br />

...<br />

}<br />

Advanced - Writing<br />

Your Own Argument<br />

Package<br />

The only reason to describe your argument package to the system is so <strong>Ocean</strong> can<br />

use your argument package for the convenience functionality. If you do not want to<br />

use any of the <strong>Ocean</strong> conveniences, then you are free to write your own argument<br />

package.<br />

Without any <strong>Ocean</strong> clients of your argument package, the only clients will be your<br />

own code: your workstep algorithm and your custom UI. Your argument package<br />

will transfer data back and forth between your UI and your workstep.<br />

You can design your argument package with whatever interfaces and interactions<br />

you feel are needed to communicate with your other classes. Once the conveniences<br />

are not being used, <strong>Ocean</strong> places no restrictions on your argument package design.<br />

To recap, this technique means that:<br />

• Your line UI will be a placeholder.<br />

• You must provide a custom dialog UI for the user to set inputs to your workstep.<br />

• You cannot use the workflow editor interoperability features (AssignToGlobal,<br />

With3DGrid, IgnoreInWorkflow) or the value $variables.<br />

6-250 <strong>Ocean</strong> <strong>Application</strong> <strong>Development</strong> <strong>Framework</strong> 2009.1

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!