02.05.2014 Views

CoreandServices.book - Ocean - Schlumberger

CoreandServices.book - Ocean - Schlumberger

CoreandServices.book - Ocean - Schlumberger

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Custom Worksteps<br />

When you throw an exception of the type WorkstepException or a derived type, the<br />

system will catch these exceptions and correctly present the failure to the end user. Any<br />

other exceptions will be treated as internal errors.<br />

Step 4 - Optionally Define Presentation: Icon and Name<br />

The workstep has a name and an icon that are shown in the Workflow editor. They appear<br />

in the line UI for your workstep and the workstep listing in the Processes tab. By default,<br />

<strong>Ocean</strong> uses the class name and a default icon.<br />

default icon<br />

Fig. 6-37 Default Workstep Presentation<br />

You can optionally control the presentation of your workstep to show a different icon and<br />

name.<br />

You implement IPresentation on your workstep to supply a bitmap for the icon and a string<br />

for the workstep name. This is described further in “IPresentation” in Volume 3, “Petrel<br />

Customization” in Chapter 2, “User Interface Services.”<br />

class MyUpscalingWorkstep :<br />

Workstep, IPresentation<br />

{ ...<br />

public string Text { get { return “UpscaleLog”; } }<br />

public Bitmap Image { get { return PetrelImages.Property; } }<br />

}<br />

public event EventHandler PresentationChanged;<br />

6-308 <strong>Ocean</strong> Application Development Framework 2008.1<br />

<strong>Schlumberger</strong> Private

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

Saved successfully!

Ooh no, something went wrong!