<?xml version="1.0" encoding="iso-8859-1"?><!-- generator="b2evolution/3.3.3" -->
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:admin="http://webns.net/mvcb/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Floyd Walker</title>
		<link>http://www.floydwalker.com/Index.php</link>
		<atom:link rel="self" type="application/rss+xml" href="http://www.floydwalker.com/Index.php?tempskin=_rss2" />
		<description></description>
		<language>en-US</language>
		<docs>http://blogs.law.harvard.edu/tech/rss</docs>
		<admin:generatorAgent rdf:resource="http://b2evolution.net/?v=3.3.3"/>
		<ttl>60</ttl>
				<item>
			<title>Unit testing ALBPM and OBPM: Unravelling PUnit, CUnit and PAPI JUnit Testing</title>
			<link>http://www.floydwalker.com/Index.php?title=unit-testing-albpm-and-obpm-unravelling-punit-cunit-and-papi-junit-testing&amp;more=1&amp;c=1&amp;tb=1&amp;pb=1</link>
			<pubDate>Thu, 24 Jun 2010 20:06:11 +0000</pubDate>			<dc:creator>Floyd</dc:creator>
			<category domain="main">BPM</category>
<category domain="alt">Java</category>			<guid isPermaLink="false">113@http://www.floydwalker.com/</guid>
						<description>&lt;p&gt;I have long been a fan of unit testing. Thus, I was full of joy when I found out that there were PUnit and CUnit objects were made available back in ALBPM version 6. &lt;br /&gt;
My good mood was quickly dashed when I found out that there was not much in documentation and examples. There is a paragraph or two in the manual. And the example included with the installation of Studio was equally terse.&lt;br /&gt;
But, over time I eventually learned the ins and outs of leveraging these objects to my benefit. While they aren't as comprehensive or as reliable as I would like, they are quite useful. &lt;br /&gt;
I will let everyone know what I have learned about these objects here, so others will not have to go through the pain I went through figuring this out.
&lt;br /&gt;&lt;br /&gt;
&lt;b&gt;PUnit and CUnit -- What they are and What they do.&lt;/b&gt;&lt;br /&gt;
First of all, let's introduce these objects to those who don't yet know them. &lt;br /&gt;
PUnit objects are a special kind of Business Object you can create in the Component Catalog in ALBPM 6, 6.5, or OBPM 10g Studio.
They allow you to create automated tests of your processes in the style of JUnit tests. They will even allow you to specify how you want interactive activities to respond through the use of PUnit tasks.&lt;br /&gt;&lt;br /&gt;
CUnit objects are another special kind of business object that allow you to create automated tests of your business objects in the Catalog. &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Creating a PUnit Test&lt;/b&gt;&lt;br /&gt;Creating a PUnit object is easy. It's just a matter of choosing the right menu option off of the &quot;New&quot; menu when you right-click on a &quot;Module&quot; of the Catalog. See the Image below.&lt;br /&gt;
&lt;br /&gt;
&lt;img src=&quot;http://www.floydwalker.com/files/punit/images/PunitMenu2.jpg&quot; alt=&quot;Creating a PUnit Object&quot; border=&quot;0&quot; /&gt;&lt;br /&gt;&lt;br /&gt;
&lt;b&gt;&lt;i&gt;Creating a PUnit Object&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Now creating a test method in the PUnit object is a bit more tricky. Right-click the PUnit object in the Catalog, select &quot;New&quot; then &quot;Method&quot;. Here is the tricky part. You have to begin the name of the test method with the word &quot;test&quot;. Otherwise, OBPM will not recognize that method as a test method. So, name the method something like &quot;testProcess&quot; or &quot;testBetterDocumentation&quot; or something like that.
After you have a test method (you will know because the method icon will be green instead of blue), you can put special PUnit test object calls into the method. You can find these easily by using Eclipse's Ctrl+Spacebar feature to tell you what you can do. The operations and objects are easy to understand, especially if you know PAPI. 
To get you started, I have written a sample test method in this &lt;a href=&quot;http://www.floydwalker.com/files/punit/UnitTestExample.exp&quot; target=&quot;_blank&quot;&gt;project export you can download here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;
Notice the built-in methods &quot;setUp&quot; and &quot;tearDown&quot;. These should be familiar to JUnit veterans. They initiate a PAPI connection/session to the Studio engine before running a test, and shut it down gracefully afterwards. You shouldn't need to change the &quot;tearDown&quot; method which is written for you. But, you may want to change the participant specified in the &quot;setUp&quot; method. After all, the participant specified here will be the user context under which the test will be performed, and you probably won't have a participant &quot;punit&quot; in your Organization settings.&lt;br /&gt;
There is also a built-in attribute of type Fuego.Test.ProcessServiceSession named session included with the PUnit test object. This is your connection to the Studio engine, and the object from which most of your interactions with the engine will be done. &lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Writing and Running a PUnit Test&lt;/b&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.floydwalker.com/files/punit/UnitTestExample.exp&quot; target=&quot;_blank&quot;&gt;The example I have provided&lt;/a&gt; shows how you can do the following tasks in a PUnit test. &lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;Create an instance of a process&lt;/li&gt;
		&lt;li&gt;Assign input arguments to a process instance&lt;/li&gt;
	  &lt;li&gt;Assert that the instance is running&lt;/li&gt;
		&lt;li&gt;Get the current activity of a running process&lt;/li&gt;
		&lt;li&gt;Get the value of an instance variable (only works for simple data types)&lt;/li&gt;
		&lt;li&gt;Assert that a process instance arrives at a certain activity within a certain amount of time&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You can do much more with the session object. But these are the activities I usually do in a Process test. The Fuego.Test.ProcessServiceSession has some similar methods to the PAPI ProcessServiceSession. But, the PUnit version is quite different. You don't have as much flexibility as do with PAPI.&lt;br /&gt; &lt;/p&gt;

&lt;p&gt;But, you are able to interact with interactive activities. Here is how you do it. Right-click on the interactive activity you are including in your process test, select the &quot;PUnit task&quot; menu option.&lt;br /&gt;
&lt;img src=&quot;http://www.floydwalker.com/files/punit/images/PunitMenu.jpg&quot; alt=&quot;Testing Interactive Activities&quot; border=&quot;0&quot; /&gt;&lt;br /&gt;&lt;br /&gt;
&lt;b&gt;&lt;i&gt;Testing Interactive Activities&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Since PUnit tests are automated, and there is no actual user interaction, you specify how the interactive activity changes the process instance (when you are running the PUnit test) in the PUnit task. So if the interactive's output parameter set an instance variable, you would set the same instance variable in the PUnit task method.&lt;br /&gt;&lt;br /&gt;
Next, in the PUnit test method, when you are sure the process instance is waiting at the interactive activity, use the session.activityExecute method to execute the PUnit task specified.&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;To run the test method, first start the ALBPM or OBPM 10g engine. Then right-click the method in the Catalog, and choose &quot;Run Test&quot;. The &quot;Test Results&quot; pane will pop-up and you can watch the test execute.&lt;br /&gt;
&lt;img src=&quot;http://www.floydwalker.com/files/punit/images/CompletedTest.jpg&quot; alt=&quot;Test Results Pane&quot; border=&quot;0&quot; /&gt;&lt;br /&gt;
&lt;b&gt;&lt;i&gt;The Test Results Pane&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
If you are using objects in your Catalog which have been introspected from jar files as input or output parameters of processes, you will need to modify Studio/Eclipse's classpath. 
The test runner executes the tests in Eclipse's Java environment. So, while writing the test code, there are no errors (Eclipse knows what is in the Catalog), and the engine runs fine (in another Tomcat Java environment which has the jar files deployed with the BPM project), the test runner will report ClassNotFound.
This is pretty tricky, I solved it by modifying the file %BEA_HOME%\albpm6.0\studio\eclipse\configuration\config.ini and changed the osgi.frameworkClassPath value to include my custom jar files in Eclipse's classpath.&lt;br /&gt;&lt;br /&gt;
While this worked for me, occasionally I still received ClassNotFound errors. But these went away when I restarted ALBPM Studio.&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Limitations of PUnit Tests&lt;/b&gt;&lt;br /&gt;
You can get the values of instance variables returned to the test method. However, this only works reliably for simple or native data types. Complex datatypes (business objects, and introspected objects) can be viewed as XML if they are serializable. Otherwise, their values can't be inspected in the test.&lt;br /&gt;
Testing processes which use subprocesses and Split/Join activites can be difficult. You can't get a subprocess' Id from the parent process. And targeting a specific thread in a Split/Join group can be difficult.&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;Those limitations aside, testing Processes with PUnit is a pretty useful feature. One of the more welcome features is the ability to change the PUnit test method and run it without having to stop the engine or redeploy the process.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Writing and Running CUnit Tests&lt;/b&gt;&lt;br /&gt;
As mentioned earlier CUnit tests can be used in the traditional fashion to test code written in Business Objects to insure they work as expected. You create and write CUnit tests in the same way as you do PUnit tests. You also have to start the names of CUnit test methods with the word &quot;test&quot;.&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;CUnit tests can also be used to verify or proove that External Systems (Web Services or Databases, etc.) are returning the expected responses to your inputs. Or, they can be used to do ad-hoc testing of Business Object code.&lt;br /&gt;
The advantage of CUnit tests to PUnit tests is that you don't need to have an engine running or a process deployed to run them. But if you are using introspected jar's in the test code, you will need to change Eclipse's classpath as shown earlier.&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Using a PAPI JUnit Java Test Environment&lt;/b&gt;&lt;br /&gt;
Sometimes you need to test your BPM project in a J2EE container because the process just does not behave the same way in Tomcat as it does in WebLogic Server. To do this, simply write JUnit test cases using PAPI. Doing this has some advantages and disadvantages to using the PUnit test cases.&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;If your subprocess activity has the &quot;Generate Events&quot; option turned on, the PAPI JUnit test case can pick up a process' subprocess id and continue testing. You can't do this with PUnit tests.&lt;/li&gt;
	&lt;li&gt;You can get the vales of instance variables of complex data	types.&lt;/li&gt;
	&lt;li&gt;PAPI JUnit test methods can not execute interactive activites in a process. PUnit tasks are not available ouside of ALBPM / OBPM Studio.
&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Once written PAPI JUnit tests can be run on both the J2EE engines as well as ALBPM / OBPM Studio engines.&lt;br /&gt;&lt;a href=&quot;http://www.floydwalker.com/files/punit/testBPMPAPIExample.zip&quot; target=&quot;_blank&quot;&gt;You can download this example&lt;/a&gt; to get you started creating a PAPI JUnit test suite.&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://www.floydwalker.com/Index.php?title=unit-testing-albpm-and-obpm-unravelling-punit-cunit-and-papi-junit-testing&amp;amp;more=1&amp;amp;c=1&amp;amp;tb=1&amp;amp;pb=1&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>I have long been a fan of unit testing. Thus, I was full of joy when I found out that there were PUnit and CUnit objects were made available back in ALBPM version 6. <br />
My good mood was quickly dashed when I found out that there was not much in documentation and examples. There is a paragraph or two in the manual. And the example included with the installation of Studio was equally terse.<br />
But, over time I eventually learned the ins and outs of leveraging these objects to my benefit. While they aren't as comprehensive or as reliable as I would like, they are quite useful. <br />
I will let everyone know what I have learned about these objects here, so others will not have to go through the pain I went through figuring this out.
<br /><br />
<b>PUnit and CUnit -- What they are and What they do.</b><br />
First of all, let's introduce these objects to those who don't yet know them. <br />
PUnit objects are a special kind of Business Object you can create in the Component Catalog in ALBPM 6, 6.5, or OBPM 10g Studio.
They allow you to create automated tests of your processes in the style of JUnit tests. They will even allow you to specify how you want interactive activities to respond through the use of PUnit tasks.<br /><br />
CUnit objects are another special kind of business object that allow you to create automated tests of your business objects in the Catalog. <br />
<br />
<b>Creating a PUnit Test</b><br />Creating a PUnit object is easy. It's just a matter of choosing the right menu option off of the "New" menu when you right-click on a "Module" of the Catalog. See the Image below.<br />
<br />
<img src="http://www.floydwalker.com/files/punit/images/PunitMenu2.jpg" alt="Creating a PUnit Object" border="0" /><br /><br />
<b><i>Creating a PUnit Object</i></b><br />
<br />
Now creating a test method in the PUnit object is a bit more tricky. Right-click the PUnit object in the Catalog, select "New" then "Method". Here is the tricky part. You have to begin the name of the test method with the word "test". Otherwise, OBPM will not recognize that method as a test method. So, name the method something like "testProcess" or "testBetterDocumentation" or something like that.
After you have a test method (you will know because the method icon will be green instead of blue), you can put special PUnit test object calls into the method. You can find these easily by using Eclipse's Ctrl+Spacebar feature to tell you what you can do. The operations and objects are easy to understand, especially if you know PAPI. 
To get you started, I have written a sample test method in this <a href="http://www.floydwalker.com/files/punit/UnitTestExample.exp" target="_blank">project export you can download here</a>.<br /><br />
Notice the built-in methods "setUp" and "tearDown". These should be familiar to JUnit veterans. They initiate a PAPI connection/session to the Studio engine before running a test, and shut it down gracefully afterwards. You shouldn't need to change the "tearDown" method which is written for you. But, you may want to change the participant specified in the "setUp" method. After all, the participant specified here will be the user context under which the test will be performed, and you probably won't have a participant "punit" in your Organization settings.<br />
There is also a built-in attribute of type Fuego.Test.ProcessServiceSession named session included with the PUnit test object. This is your connection to the Studio engine, and the object from which most of your interactions with the engine will be done. <br /></p>

<p><b>Writing and Running a PUnit Test</b><br />
<a href="http://www.floydwalker.com/files/punit/UnitTestExample.exp" target="_blank">The example I have provided</a> shows how you can do the following tasks in a PUnit test. </p>
<ul>
    <li>Create an instance of a process</li>
		<li>Assign input arguments to a process instance</li>
	  <li>Assert that the instance is running</li>
		<li>Get the current activity of a running process</li>
		<li>Get the value of an instance variable (only works for simple data types)</li>
		<li>Assert that a process instance arrives at a certain activity within a certain amount of time</li>
</ul>
<p>You can do much more with the session object. But these are the activities I usually do in a Process test. The Fuego.Test.ProcessServiceSession has some similar methods to the PAPI ProcessServiceSession. But, the PUnit version is quite different. You don't have as much flexibility as do with PAPI.<br /> </p>

<p>But, you are able to interact with interactive activities. Here is how you do it. Right-click on the interactive activity you are including in your process test, select the "PUnit task" menu option.<br />
<img src="http://www.floydwalker.com/files/punit/images/PunitMenu.jpg" alt="Testing Interactive Activities" border="0" /><br /><br />
<b><i>Testing Interactive Activities</i></b><br />
<br />
Since PUnit tests are automated, and there is no actual user interaction, you specify how the interactive activity changes the process instance (when you are running the PUnit test) in the PUnit task. So if the interactive's output parameter set an instance variable, you would set the same instance variable in the PUnit task method.<br /><br />
Next, in the PUnit test method, when you are sure the process instance is waiting at the interactive activity, use the session.activityExecute method to execute the PUnit task specified.<br /></p>

<p>To run the test method, first start the ALBPM or OBPM 10g engine. Then right-click the method in the Catalog, and choose "Run Test". The "Test Results" pane will pop-up and you can watch the test execute.<br />
<img src="http://www.floydwalker.com/files/punit/images/CompletedTest.jpg" alt="Test Results Pane" border="0" /><br />
<b><i>The Test Results Pane</i></b><br />
<br />
If you are using objects in your Catalog which have been introspected from jar files as input or output parameters of processes, you will need to modify Studio/Eclipse's classpath. 
The test runner executes the tests in Eclipse's Java environment. So, while writing the test code, there are no errors (Eclipse knows what is in the Catalog), and the engine runs fine (in another Tomcat Java environment which has the jar files deployed with the BPM project), the test runner will report ClassNotFound.
This is pretty tricky, I solved it by modifying the file %BEA_HOME%\albpm6.0\studio\eclipse\configuration\config.ini and changed the osgi.frameworkClassPath value to include my custom jar files in Eclipse's classpath.<br /><br />
While this worked for me, occasionally I still received ClassNotFound errors. But these went away when I restarted ALBPM Studio.<br /></p>

<p><b>Limitations of PUnit Tests</b><br />
You can get the values of instance variables returned to the test method. However, this only works reliably for simple or native data types. Complex datatypes (business objects, and introspected objects) can be viewed as XML if they are serializable. Otherwise, their values can't be inspected in the test.<br />
Testing processes which use subprocesses and Split/Join activites can be difficult. You can't get a subprocess' Id from the parent process. And targeting a specific thread in a Split/Join group can be difficult.<br /></p>

<p>Those limitations aside, testing Processes with PUnit is a pretty useful feature. One of the more welcome features is the ability to change the PUnit test method and run it without having to stop the engine or redeploy the process.</p>

<p><b>Writing and Running CUnit Tests</b><br />
As mentioned earlier CUnit tests can be used in the traditional fashion to test code written in Business Objects to insure they work as expected. You create and write CUnit tests in the same way as you do PUnit tests. You also have to start the names of CUnit test methods with the word "test".<br /></p>

<p>CUnit tests can also be used to verify or proove that External Systems (Web Services or Databases, etc.) are returning the expected responses to your inputs. Or, they can be used to do ad-hoc testing of Business Object code.<br />
The advantage of CUnit tests to PUnit tests is that you don't need to have an engine running or a process deployed to run them. But if you are using introspected jar's in the test code, you will need to change Eclipse's classpath as shown earlier.<br /></p>

<p><b>Using a PAPI JUnit Java Test Environment</b><br />
Sometimes you need to test your BPM project in a J2EE container because the process just does not behave the same way in Tomcat as it does in WebLogic Server. To do this, simply write JUnit test cases using PAPI. Doing this has some advantages and disadvantages to using the PUnit test cases.</p>
<ul>
  <li>If your subprocess activity has the "Generate Events" option turned on, the PAPI JUnit test case can pick up a process' subprocess id and continue testing. You can't do this with PUnit tests.</li>
	<li>You can get the vales of instance variables of complex data	types.</li>
	<li>PAPI JUnit test methods can not execute interactive activites in a process. PUnit tasks are not available ouside of ALBPM / OBPM Studio.
</li></ul>
<p>Once written PAPI JUnit tests can be run on both the J2EE engines as well as ALBPM / OBPM Studio engines.<br /><a href="http://www.floydwalker.com/files/punit/testBPMPAPIExample.zip" target="_blank">You can download this example</a> to get you started creating a PAPI JUnit test suite.</p><div class="item_footer"><p><small><a href="http://www.floydwalker.com/Index.php?title=unit-testing-albpm-and-obpm-unravelling-punit-cunit-and-papi-junit-testing&amp;more=1&amp;c=1&amp;tb=1&amp;pb=1">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://www.floydwalker.com/Index.php?title=unit-testing-albpm-and-obpm-unravelling-punit-cunit-and-papi-junit-testing&amp;more=1&amp;c=1&amp;tb=1&amp;pb=1#comments</comments>
			<wfw:commentRss>http://www.floydwalker.com/Index.php?tempskin=_rss2&#38;disp=comments&#38;p=113</wfw:commentRss>
		</item>
				<item>
			<title>Maximizing Instance Memory Efficiency in OBPM / ALBPM</title>
			<link>http://www.floydwalker.com/Index.php?title=maximizing-instance-memory-efficiency-in-obpm-albpm&amp;more=1&amp;c=1&amp;tb=1&amp;pb=1</link>
			<pubDate>Wed, 19 May 2010 18:03:26 +0000</pubDate>			<dc:creator>Floyd</dc:creator>
			<category domain="main">BPM</category>			<guid isPermaLink="false">112@http://www.floydwalker.com/</guid>
						<description>&lt;p&gt;When you get to the point where you have hundreds of thousands of active instances in your engines, minimizing the amount of memory each instance uses is essential. Insuring you have a good process design at the beginning will save you problems trying to scale your servers to support them. This article will give you some ideas how this can be done.&lt;/p&gt;

&lt;p&gt;Most of us software developers are familiar with the venerable Model/View/Control (MVC) methodology which has greatly increased memory efficiency, performance, and maintainability in our projects. I have developed a similar methodolgy for developing BPM projects in OBPM / ALBPM which has proven to be successful.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Three Kinds of Business Objects&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;The BPM Component Catalog allows you to introspect many kinds of objects from disparate resources. While this is very convenient, don't get into the trap of using those objects as they are imported. This will usually get you using objects which consume much more memory than you need. It is better to create new objects which just accomplish what BPM needs to do, and have methods or helper objects to transfer the appropriate information between concerned objects. &lt;/p&gt;


&lt;p&gt;&lt;img src=&quot;http://www.floydwalker.com/files/images/BPMVC/Image2.png&quot; alt=&quot;Sample Business Model Object&quot; border=&quot;0&quot; /&gt;&lt;br /&gt;
&lt;b&gt;&lt;i&gt;Sample Business Model Object&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;


&lt;p&gt;If you start to segregating your object, you will end up having three kinds of objects: Business Model Objects, Process Flow Objects, and Process View Objects. I will explain what I mean below.&lt;/p&gt;


&lt;p&gt;&lt;img src=&quot;http://www.floydwalker.com/files/images/BPMVC/Image1.png&quot; alt=&quot;Separating the Object Into Useful Portions&quot; border=&quot;0&quot; /&gt;&lt;br /&gt;
&lt;b&gt;&lt;i&gt;Separating the Object Into Useful Portions&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;


&lt;p&gt;&lt;b&gt;Business Model Objects&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;These are usually the objects which are introspected into the Component Catalog. They are very detailed an complex. They probably have relationships with other objects. They represent the knowledge of a business concept, or at least how those concepts interact with the business' systems.&lt;/p&gt;

&lt;p&gt;Business Model Objects are very useful for interacting with web services, databases, and other external systems. But for processes because of their memory requirements. And, they are cumbersome to use for user interfaces because the data is optimized for retrieval and storage, not for data entry or display to a human.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Process Flow Objects&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;The Process Flow Objects contain a subset of the information stored in the Business Model Objects. The idea is to only have information in these objects which the process flow will need for decisions and supporting the process flow.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Process View Objects&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;These objects also contain a subset of the Business Model Objects. The focus of the Process View Objects are supporting Screenflows or Presentations. The data and object structure of these objects is optimized for easy presentation of user interfaces.&lt;/p&gt;


&lt;p&gt;&lt;b&gt;Using Business Model Objects in the Process Flow&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;So if you take the bait, and use your Business Model Objects as instance variables in your process flows, here is what happens. First, there is a big splash as the object is filled in by your back-end systems. Information is shared between activities by putting in or changing data in the object's attributes. As the process goes through its life-cycle, the object grows in memory usage. And, the object is using memory for the full duration of the lifespan of the process.&lt;/p&gt;


&lt;p&gt;&lt;img src=&quot;http://www.floydwalker.com/files/images/BPMVC/Image4.png&quot; alt=&quot;Using Business Model Objects in the Process Flow&quot; border=&quot;0&quot; /&gt;&lt;br /&gt;
&lt;b&gt;&lt;i&gt;Using Business Model Objects in the Process Flow&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;


&lt;p&gt;&lt;b&gt;Using the Three Object Types Method in the Process Flow&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Business Objects are used in automatic activities to provide data to the Process Flow and Process View objects. They are then unloaded from memory.The objects with the smallest footprint (the Process Flow objects) are in memory the longest. &lt;/p&gt;


&lt;p&gt;&lt;img src=&quot;http://www.floydwalker.com/files/images/BPMVC/Image6.png&quot; alt=&quot;Using the Three Object Types&quot; border=&quot;0&quot; /&gt;&lt;br /&gt;
&lt;b&gt;&lt;i&gt;Using the Three Object Types&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;


&lt;p&gt;Process View objects are loaded with data in order to support interactive activities. They are only in instance memory long enough to complete the interactive activity, and send the results to the other objects. Since these objects are optimized for the screenflows, their memory usage is reduced.&lt;/p&gt;


&lt;p&gt;&lt;img src=&quot;http://www.floydwalker.com/files/images/BPMVC/Image5.png&quot; alt=&quot;Object Type Relationships&quot; border=&quot;0&quot; /&gt;&lt;br /&gt;
&lt;b&gt;&lt;i&gt;Object Type Relationships&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;


&lt;p&gt;&lt;b&gt;Well That's Nice, But...&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Yeah, sometimes you just need to keep large chunks of data around to avoid performance problems caused by excess chatter (from continually loading the Business Model Objects). This is when you would use &quot;separated&quot; instance variables. These are then stored in a database table and not in direct instance memory.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;How to Segment Business Model Objects&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;First, Business Model Objects can have methods to load and save to database/webservice/etc. This keeps the complexity of the persistence method out of the process flows completely. &lt;/p&gt;


&lt;p&gt;&lt;img src=&quot;http://www.floydwalker.com/files/images/BPMVC/Image3.png&quot; alt=&quot;Segmenting the Objects&quot; border=&quot;0&quot; /&gt;&lt;br /&gt;
&lt;b&gt;&lt;i&gt;Segmenting the Objects&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;


&lt;p&gt;Next, Process Flow Objects can have methods for loading their information from the Business Model Objects. &lt;/p&gt;

&lt;p&gt;Then, Process View Objects can have methods for loading and saving their information back to the appropriate objects.&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://www.floydwalker.com/Index.php?title=maximizing-instance-memory-efficiency-in-obpm-albpm&amp;amp;more=1&amp;amp;c=1&amp;amp;tb=1&amp;amp;pb=1&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>When you get to the point where you have hundreds of thousands of active instances in your engines, minimizing the amount of memory each instance uses is essential. Insuring you have a good process design at the beginning will save you problems trying to scale your servers to support them. This article will give you some ideas how this can be done.</p>

<p>Most of us software developers are familiar with the venerable Model/View/Control (MVC) methodology which has greatly increased memory efficiency, performance, and maintainability in our projects. I have developed a similar methodolgy for developing BPM projects in OBPM / ALBPM which has proven to be successful.</p>

<p><b>Three Kinds of Business Objects</b></p>

<p>The BPM Component Catalog allows you to introspect many kinds of objects from disparate resources. While this is very convenient, don't get into the trap of using those objects as they are imported. This will usually get you using objects which consume much more memory than you need. It is better to create new objects which just accomplish what BPM needs to do, and have methods or helper objects to transfer the appropriate information between concerned objects. </p>


<p><img src="http://www.floydwalker.com/files/images/BPMVC/Image2.png" alt="Sample Business Model Object" border="0" /><br />
<b><i>Sample Business Model Object</i></b></p>


<p>If you start to segregating your object, you will end up having three kinds of objects: Business Model Objects, Process Flow Objects, and Process View Objects. I will explain what I mean below.</p>


<p><img src="http://www.floydwalker.com/files/images/BPMVC/Image1.png" alt="Separating the Object Into Useful Portions" border="0" /><br />
<b><i>Separating the Object Into Useful Portions</i></b></p>


<p><b>Business Model Objects</b></p>

<p>These are usually the objects which are introspected into the Component Catalog. They are very detailed an complex. They probably have relationships with other objects. They represent the knowledge of a business concept, or at least how those concepts interact with the business' systems.</p>

<p>Business Model Objects are very useful for interacting with web services, databases, and other external systems. But for processes because of their memory requirements. And, they are cumbersome to use for user interfaces because the data is optimized for retrieval and storage, not for data entry or display to a human.</p>

<p><b>Process Flow Objects</b></p>

<p>The Process Flow Objects contain a subset of the information stored in the Business Model Objects. The idea is to only have information in these objects which the process flow will need for decisions and supporting the process flow.</p>

<p><b>Process View Objects</b></p>

<p>These objects also contain a subset of the Business Model Objects. The focus of the Process View Objects are supporting Screenflows or Presentations. The data and object structure of these objects is optimized for easy presentation of user interfaces.</p>


<p><b>Using Business Model Objects in the Process Flow</b></p>

<p>So if you take the bait, and use your Business Model Objects as instance variables in your process flows, here is what happens. First, there is a big splash as the object is filled in by your back-end systems. Information is shared between activities by putting in or changing data in the object's attributes. As the process goes through its life-cycle, the object grows in memory usage. And, the object is using memory for the full duration of the lifespan of the process.</p>


<p><img src="http://www.floydwalker.com/files/images/BPMVC/Image4.png" alt="Using Business Model Objects in the Process Flow" border="0" /><br />
<b><i>Using Business Model Objects in the Process Flow</i></b></p>


<p><b>Using the Three Object Types Method in the Process Flow</b></p>

<p>Business Objects are used in automatic activities to provide data to the Process Flow and Process View objects. They are then unloaded from memory.The objects with the smallest footprint (the Process Flow objects) are in memory the longest. </p>


<p><img src="http://www.floydwalker.com/files/images/BPMVC/Image6.png" alt="Using the Three Object Types" border="0" /><br />
<b><i>Using the Three Object Types</i></b></p>


<p>Process View objects are loaded with data in order to support interactive activities. They are only in instance memory long enough to complete the interactive activity, and send the results to the other objects. Since these objects are optimized for the screenflows, their memory usage is reduced.</p>


<p><img src="http://www.floydwalker.com/files/images/BPMVC/Image5.png" alt="Object Type Relationships" border="0" /><br />
<b><i>Object Type Relationships</i></b></p>


<p><b>Well That's Nice, But...</b></p>

<p>Yeah, sometimes you just need to keep large chunks of data around to avoid performance problems caused by excess chatter (from continually loading the Business Model Objects). This is when you would use "separated" instance variables. These are then stored in a database table and not in direct instance memory.</p>

<p><b>How to Segment Business Model Objects</b></p>

<p>First, Business Model Objects can have methods to load and save to database/webservice/etc. This keeps the complexity of the persistence method out of the process flows completely. </p>


<p><img src="http://www.floydwalker.com/files/images/BPMVC/Image3.png" alt="Segmenting the Objects" border="0" /><br />
<b><i>Segmenting the Objects</i></b></p>


<p>Next, Process Flow Objects can have methods for loading their information from the Business Model Objects. </p>

<p>Then, Process View Objects can have methods for loading and saving their information back to the appropriate objects.</p><div class="item_footer"><p><small><a href="http://www.floydwalker.com/Index.php?title=maximizing-instance-memory-efficiency-in-obpm-albpm&amp;more=1&amp;c=1&amp;tb=1&amp;pb=1">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://www.floydwalker.com/Index.php?title=maximizing-instance-memory-efficiency-in-obpm-albpm&amp;more=1&amp;c=1&amp;tb=1&amp;pb=1#comments</comments>
			<wfw:commentRss>http://www.floydwalker.com/Index.php?tempskin=_rss2&#38;disp=comments&#38;p=112</wfw:commentRss>
		</item>
				<item>
			<title>JMS Techniques in OBPM</title>
			<link>http://www.floydwalker.com/Index.php?title=jms-techniques-in-obpm&amp;more=1&amp;c=1&amp;tb=1&amp;pb=1</link>
			<pubDate>Wed, 21 Apr 2010 11:37:46 +0000</pubDate>			<dc:creator>Floyd</dc:creator>
			<category domain="main">BPM</category>			<guid isPermaLink="false">111@http://www.floydwalker.com/</guid>
						<description>&lt;p&gt;&lt;b&gt;Background&lt;/b&gt;&lt;br /&gt;
I have had several clients now desire to dump their current Web Service integrations in favor of using JMS in their BPM orchestrations. The reasons are many, but the main ones have to do with message persistence and scalability. Messages sent with JMS are queued up and persisted until the consumer is ready. And, JMS is a little more efficient than Web Services due to the lack of the SOAP envelope. Whatever your reasons for wanting to use JMS instead of Web Services in OBPM/ALBPM, this article should help you a bit.&lt;/p&gt;


&lt;p&gt;&lt;b&gt;Not as Simple as it Sounds&lt;/b&gt;&lt;br /&gt;
OBPM makes it seriously easy to implement Web Service integrations. Just introspect the WSDL into the catalog and then drag a method from the catalog to a code-block.  The response is usually returned immediately in the typical HTTP request/response cycle. Plus, all of the objects involved are usually embedded in the WSDL so everybody knows what they are talking about.&lt;br /&gt;
With JMS, the BPM process has to listen to a JMS Queue with a Global Automatic activity and manually wait for a response using a Notification Wait activity for an asynchronous response. Also, if you are doing more than just simple text JMS messages, all the objects being used will need to be manually introspected into the catalog, and kept up to date with what the other side of the JMS conversation is using. The following diagram shows the differences. &lt;/p&gt;


&lt;p&gt;&lt;img src=&quot;http://www.floydwalker.com/files/jms/wsvsjms.png&quot; border=&quot;0&quot; alt=&quot;Web Services vs. JMS&quot; /&gt;&lt;br /&gt;
 &lt;/p&gt;

&lt;p&gt;&lt;b&gt;The Message Router&lt;/b&gt;&lt;br /&gt;
You may be asking why you need two processes for this to work. Well, if you just have one JMS conversation going on, then you will only need one process. Something like the following diagram will certainly do the trick.&lt;br /&gt;
 &lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.floydwalker.com/files/jms/SimpleJMS.png&quot; border=&quot;0&quot; alt=&quot;Simple JMS Response&quot; /&gt;&lt;/p&gt;


&lt;p&gt;But, if you have several conversations going on with numerous processes, you won&amp;#8217;t want to have a single JMS queue built for each conversation in each process. You will probably want to use just a few JMS queues and route messages to the processes based upon what is in the messages (such as by object type). Thus you will end up with something like the following message router process (MRP).&lt;br /&gt;
 &lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.floydwalker.com/files/jms/router.png&quot; border=&quot;0&quot; alt=&quot;Message Router Process&quot; /&gt;&lt;/p&gt;

&lt;p&gt; &lt;br /&gt;
Note: I don&amp;#8217;t like using the Process Notification activity to notify processes. If the process instance to be notified is not found, the instance of the MRP is aborted. If an error handler is present in the MRP, this can be avoided, but the engine still logs a Warning error in the log. Get enough of these, and it can really clutter up the log. I prefer to use the PBL  Notification.Send method in an Automatic Activity. Then, you have more control over what happens in these scenarios.&lt;/p&gt;


&lt;p&gt;&lt;b&gt;Processing the Notification&lt;/b&gt;&lt;br /&gt;
A Correlation Set has to be created and initialized by the process receiving the notification from the message router process (MRP) before it receives the notification. This is so that the MRP can find the appropriate process instance by the unique business Id. The MRP does not need to know about the Correlation Set, it just needs to set the appropriate unique business Id argument before sending the notification.&lt;br /&gt;
The receiving process also needs to handle unexpected problems with the messaging conversation. Here are a couple of examples. First, to handle the case where the JMS sender never sends a response, an activity with a due transition needs to be present to time-out the conversation. Next, when the sender responds with a message that it couldn&amp;#8217;t perform the desired action, a conditional path is created.&lt;br /&gt;
So our simple example from earlier now looks like this.&lt;br /&gt;
 &lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.floydwalker.com/files/jms/notSoSimpleJMS.png&quot; border=&quot;0&quot; alt=&quot;Not So Simple JMS Response&quot; /&gt;&lt;/p&gt;


&lt;p&gt; &lt;br /&gt;
Whew! That&amp;#8217;s a lot of infrastructure to build up just to replace a simple Web Service request/response. Yeah, JMS may be more efficient, but its implementation here is much more verbose.&lt;br /&gt;
Now that you have a better idea of how to do it, I have a few implementation patterns you may want to consider in implementing JMS in OBPM/ALBPM.&lt;/p&gt;


&lt;p&gt;&lt;b&gt;JMS Process Pattern 1: Interrupting Interactive Activities&lt;/b&gt;&lt;br /&gt;
This is a case where a process instance is waiting at an Interactive Activity, and it needs to move on to the next activity when it receives a JMS message. Essentially, the process flow is blocked by an Interactive instead of a Notification Wait activity. This pattern works well when you want the process instance to appear in the Workspace inbox even though it is actually waiting for a JMS notification. The user can then have the opportunity to interact with the process without having to search for it and use a Grab.&lt;/p&gt;

&lt;p&gt;I like this pattern because it increases the visibility of the process instance in the Workspace. Plus, it gives the user more information and influence over the instance. The user can have their view set to sort by instance creation date, and easily see which instances have been stuck too long waiting on a notification. If we used Notification Wait&amp;#8217;s to block the process, a custom view would need to be created to cause the instances to be visible.&lt;br /&gt;
 &lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.floydwalker.com/files/jms/ex1.png&quot; border=&quot;0&quot; alt=&quot;Example 1: Using Interactives to Block the Flow&quot; /&gt;&lt;/p&gt;

&lt;p&gt; &lt;br /&gt;
A Correlation Set is initiated in the Begin activity, and used in the Notification Wait activity. The latter has the &amp;#8220;Allows Interruptions&amp;#8221; option turned on so that when the notification occurs, it will interrupt the running instance in a way similar to the error handling flows. In the automatic activity, the PBL sets the predefined variable &amp;#8220;action&amp;#8221; to SKIP. Thus, when the notification flow reaches the Compensation Activity, the process instance will skip the processing of the current activity (the interactive) and proceed on to the next activity down the unconditional path towards the &amp;#8220;Finalize&amp;#8221; activity. The Grab Activity is there so participants in a more administrative role can easily move the instance along the path should the notification never arrive.&lt;/p&gt;


&lt;p&gt;&lt;b&gt;JMS Process Pattern 2: Manually Moving a Process Instance&lt;/b&gt;&lt;br /&gt;
The &amp;#8220;action=SKIP&amp;#8221; strategy only works if the next activity in the process flow is where you want the instance after the notification arrives. What do you do if you need more control over where the process instance goes? That is the question that the following pattern answers.&lt;/p&gt;

&lt;p&gt;The diagram of this pattern is exactly like the previous one, except for the addition is the &amp;#8220;Exception Grab&amp;#8221; activity. This is a From All/To All Grab. I call these &amp;#8220;Exception Grab&amp;#8217;s&amp;#8221; because they are usually used as a method of last resort to fix a process instance that has gone down the wrong path. &lt;br /&gt;
 &lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.floydwalker.com/files/jms/ex2.png&quot; border=&quot;0&quot; alt=&quot;Example 2: Destination Control&quot; /&gt;&lt;/p&gt;


&lt;p&gt;In the notification flow, the Automatic Activity uses a round-about way to automatically execute the Exception Grab to send the instance to the activity of choice.&lt;br /&gt;
 &lt;br /&gt;
Because you can&amp;#8217;t execute a grab while in a notification or error flow, a simple process is created to connect to the engine, find the process, and execute the grab.&lt;br /&gt;
All of the code and the processes are included in the sample project export that can be downloaded below. Also, this example (in the export) shows how to manually initiate and finalize the Correlation Set in PBL.&lt;/p&gt;


&lt;p&gt;&lt;b&gt;JMS Process Pattern 3: Handling Multiple Asynchronous JMS Responses&lt;/b&gt;&lt;br /&gt;
This pattern addresses the case where a single request can cause multiple JMS responses. And, these responses can arrive in any order. But the process must wait for all of the messages to be received and so something with the responses as they arrive.&lt;br /&gt;
 &lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.floydwalker.com/files/jms/ex3.png&quot; border=&quot;0&quot; alt=&quot;Example 3: Asynchronous JMS Responses&quot; /&gt;&lt;/p&gt;

&lt;p&gt; &lt;br /&gt;
To achieve this, a business object is created in the catalog to keep a record of the messages that have arrived. The business object is implemented as an instance variable.  The flow is blocked by an Interactive Activity only if a message has not been received.&lt;br /&gt;
This example shows how to use activity.source to determine where in the process the instance was at when the notification arrives. It also shows how instance state can be preserved when multiple asynchronous events are occurring, and they can occur at any time of the life of the instance. Boolean flags are used in the business object instance to insure that the process instance only reacts once to a certain type of message.&lt;br /&gt;
Note: In the process export all four Automatic Activities utilize the same process method.&lt;/p&gt;


&lt;p&gt;&lt;b&gt;Process Project Export&lt;/b&gt;&lt;br /&gt;
All three of these patterns are included in the following Process Project Export. Also included is the &amp;#8220;GrabAndRedirect&amp;#8221; process and demonstrations on how to send a JMS message in PBL. &lt;a href=&quot;http://www.floydwalker.com/files/jms/JMSExample.exp&quot; target=&quot;_blank&quot;&gt;Here is the download.&lt;/a&gt;&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://www.floydwalker.com/Index.php?title=jms-techniques-in-obpm&amp;amp;more=1&amp;amp;c=1&amp;amp;tb=1&amp;amp;pb=1&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p><b>Background</b><br />
I have had several clients now desire to dump their current Web Service integrations in favor of using JMS in their BPM orchestrations. The reasons are many, but the main ones have to do with message persistence and scalability. Messages sent with JMS are queued up and persisted until the consumer is ready. And, JMS is a little more efficient than Web Services due to the lack of the SOAP envelope. Whatever your reasons for wanting to use JMS instead of Web Services in OBPM/ALBPM, this article should help you a bit.</p>


<p><b>Not as Simple as it Sounds</b><br />
OBPM makes it seriously easy to implement Web Service integrations. Just introspect the WSDL into the catalog and then drag a method from the catalog to a code-block.  The response is usually returned immediately in the typical HTTP request/response cycle. Plus, all of the objects involved are usually embedded in the WSDL so everybody knows what they are talking about.<br />
With JMS, the BPM process has to listen to a JMS Queue with a Global Automatic activity and manually wait for a response using a Notification Wait activity for an asynchronous response. Also, if you are doing more than just simple text JMS messages, all the objects being used will need to be manually introspected into the catalog, and kept up to date with what the other side of the JMS conversation is using. The following diagram shows the differences. </p>


<p><img src="http://www.floydwalker.com/files/jms/wsvsjms.png" border="0" alt="Web Services vs. JMS" /><br />
 </p>

<p><b>The Message Router</b><br />
You may be asking why you need two processes for this to work. Well, if you just have one JMS conversation going on, then you will only need one process. Something like the following diagram will certainly do the trick.<br />
 </p>

<p><img src="http://www.floydwalker.com/files/jms/SimpleJMS.png" border="0" alt="Simple JMS Response" /></p>


<p>But, if you have several conversations going on with numerous processes, you won&#8217;t want to have a single JMS queue built for each conversation in each process. You will probably want to use just a few JMS queues and route messages to the processes based upon what is in the messages (such as by object type). Thus you will end up with something like the following message router process (MRP).<br />
 </p>

<p><img src="http://www.floydwalker.com/files/jms/router.png" border="0" alt="Message Router Process" /></p>

<p> <br />
Note: I don&#8217;t like using the Process Notification activity to notify processes. If the process instance to be notified is not found, the instance of the MRP is aborted. If an error handler is present in the MRP, this can be avoided, but the engine still logs a Warning error in the log. Get enough of these, and it can really clutter up the log. I prefer to use the PBL  Notification.Send method in an Automatic Activity. Then, you have more control over what happens in these scenarios.</p>


<p><b>Processing the Notification</b><br />
A Correlation Set has to be created and initialized by the process receiving the notification from the message router process (MRP) before it receives the notification. This is so that the MRP can find the appropriate process instance by the unique business Id. The MRP does not need to know about the Correlation Set, it just needs to set the appropriate unique business Id argument before sending the notification.<br />
The receiving process also needs to handle unexpected problems with the messaging conversation. Here are a couple of examples. First, to handle the case where the JMS sender never sends a response, an activity with a due transition needs to be present to time-out the conversation. Next, when the sender responds with a message that it couldn&#8217;t perform the desired action, a conditional path is created.<br />
So our simple example from earlier now looks like this.<br />
 </p>

<p><img src="http://www.floydwalker.com/files/jms/notSoSimpleJMS.png" border="0" alt="Not So Simple JMS Response" /></p>


<p> <br />
Whew! That&#8217;s a lot of infrastructure to build up just to replace a simple Web Service request/response. Yeah, JMS may be more efficient, but its implementation here is much more verbose.<br />
Now that you have a better idea of how to do it, I have a few implementation patterns you may want to consider in implementing JMS in OBPM/ALBPM.</p>


<p><b>JMS Process Pattern 1: Interrupting Interactive Activities</b><br />
This is a case where a process instance is waiting at an Interactive Activity, and it needs to move on to the next activity when it receives a JMS message. Essentially, the process flow is blocked by an Interactive instead of a Notification Wait activity. This pattern works well when you want the process instance to appear in the Workspace inbox even though it is actually waiting for a JMS notification. The user can then have the opportunity to interact with the process without having to search for it and use a Grab.</p>

<p>I like this pattern because it increases the visibility of the process instance in the Workspace. Plus, it gives the user more information and influence over the instance. The user can have their view set to sort by instance creation date, and easily see which instances have been stuck too long waiting on a notification. If we used Notification Wait&#8217;s to block the process, a custom view would need to be created to cause the instances to be visible.<br />
 </p>

<p><img src="http://www.floydwalker.com/files/jms/ex1.png" border="0" alt="Example 1: Using Interactives to Block the Flow" /></p>

<p> <br />
A Correlation Set is initiated in the Begin activity, and used in the Notification Wait activity. The latter has the &#8220;Allows Interruptions&#8221; option turned on so that when the notification occurs, it will interrupt the running instance in a way similar to the error handling flows. In the automatic activity, the PBL sets the predefined variable &#8220;action&#8221; to SKIP. Thus, when the notification flow reaches the Compensation Activity, the process instance will skip the processing of the current activity (the interactive) and proceed on to the next activity down the unconditional path towards the &#8220;Finalize&#8221; activity. The Grab Activity is there so participants in a more administrative role can easily move the instance along the path should the notification never arrive.</p>


<p><b>JMS Process Pattern 2: Manually Moving a Process Instance</b><br />
The &#8220;action=SKIP&#8221; strategy only works if the next activity in the process flow is where you want the instance after the notification arrives. What do you do if you need more control over where the process instance goes? That is the question that the following pattern answers.</p>

<p>The diagram of this pattern is exactly like the previous one, except for the addition is the &#8220;Exception Grab&#8221; activity. This is a From All/To All Grab. I call these &#8220;Exception Grab&#8217;s&#8221; because they are usually used as a method of last resort to fix a process instance that has gone down the wrong path. <br />
 </p>

<p><img src="http://www.floydwalker.com/files/jms/ex2.png" border="0" alt="Example 2: Destination Control" /></p>


<p>In the notification flow, the Automatic Activity uses a round-about way to automatically execute the Exception Grab to send the instance to the activity of choice.<br />
 <br />
Because you can&#8217;t execute a grab while in a notification or error flow, a simple process is created to connect to the engine, find the process, and execute the grab.<br />
All of the code and the processes are included in the sample project export that can be downloaded below. Also, this example (in the export) shows how to manually initiate and finalize the Correlation Set in PBL.</p>


<p><b>JMS Process Pattern 3: Handling Multiple Asynchronous JMS Responses</b><br />
This pattern addresses the case where a single request can cause multiple JMS responses. And, these responses can arrive in any order. But the process must wait for all of the messages to be received and so something with the responses as they arrive.<br />
 </p>

<p><img src="http://www.floydwalker.com/files/jms/ex3.png" border="0" alt="Example 3: Asynchronous JMS Responses" /></p>

<p> <br />
To achieve this, a business object is created in the catalog to keep a record of the messages that have arrived. The business object is implemented as an instance variable.  The flow is blocked by an Interactive Activity only if a message has not been received.<br />
This example shows how to use activity.source to determine where in the process the instance was at when the notification arrives. It also shows how instance state can be preserved when multiple asynchronous events are occurring, and they can occur at any time of the life of the instance. Boolean flags are used in the business object instance to insure that the process instance only reacts once to a certain type of message.<br />
Note: In the process export all four Automatic Activities utilize the same process method.</p>


<p><b>Process Project Export</b><br />
All three of these patterns are included in the following Process Project Export. Also included is the &#8220;GrabAndRedirect&#8221; process and demonstrations on how to send a JMS message in PBL. <a href="http://www.floydwalker.com/files/jms/JMSExample.exp" target="_blank">Here is the download.</a></p><div class="item_footer"><p><small><a href="http://www.floydwalker.com/Index.php?title=jms-techniques-in-obpm&amp;more=1&amp;c=1&amp;tb=1&amp;pb=1">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://www.floydwalker.com/Index.php?title=jms-techniques-in-obpm&amp;more=1&amp;c=1&amp;tb=1&amp;pb=1#comments</comments>
			<wfw:commentRss>http://www.floydwalker.com/Index.php?tempskin=_rss2&#38;disp=comments&#38;p=111</wfw:commentRss>
		</item>
				<item>
			<title>FindClass -- A Simple Utility To Find A Java Class in a Folder of Jars.</title>
			<link>http://www.floydwalker.com/Index.php?title=findclass-a-simple-utility-to-find-a-java-class-in-a-folder-of-jars&amp;more=1&amp;c=1&amp;tb=1&amp;pb=1</link>
			<pubDate>Thu, 15 Apr 2010 11:59:05 +0000</pubDate>			<dc:creator>Floyd</dc:creator>
			<category domain="main">.NET</category>
<category domain="alt">Java</category>			<guid isPermaLink="false">110@http://www.floydwalker.com/</guid>
						<description>&lt;p&gt;A long time ago, when I was supporting various Java applications I didn't write, I was freqently encountering the dreaded ClassNotFound exception. (Haven't we all.)&lt;/p&gt;

&lt;p&gt;I had just finished playing with FWZipLib.dll wrapper around the Info Zip libraries. So, I quickly wrote this utility to scan a folder of jar's (which are just zip files anyway) for a class provided on the command line. It proved so useful that I still use it occasionally.&lt;/p&gt;

&lt;p&gt;It is a simple C# console application. To use it, here is the syntax:&lt;/p&gt;
&lt;pre&gt;
FindClass ClassNameToFind c:\SomeFolder\SomeJavaApp\lib
&lt;/pre&gt;&lt;p&gt;&lt;br /&gt; &lt;/p&gt;

&lt;p&gt;The utility will then list all of the jar files in the folder. Then, it will tell you when it finds the class file in one of the jar's. &lt;br /&gt;
 &lt;br /&gt;
However useful it may be, I never really updated it with any fancy features. &lt;a href=&quot;http://www.zipscan.co.uk/&quot; target=&quot;_blank&quot;&gt;There are other utilities&lt;/a&gt; which other jar-heads use for this feature. But if you like a simple, and free, utility to find those elusive classes, you can &lt;a href=&quot;http://www.floydwalker.com/files/FindClass.zip&quot; target=&quot;_blank&quot;&gt;download it here&lt;/a&gt;.&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://www.floydwalker.com/Index.php?title=findclass-a-simple-utility-to-find-a-java-class-in-a-folder-of-jars&amp;amp;more=1&amp;amp;c=1&amp;amp;tb=1&amp;amp;pb=1&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>A long time ago, when I was supporting various Java applications I didn't write, I was freqently encountering the dreaded ClassNotFound exception. (Haven't we all.)</p>

<p>I had just finished playing with FWZipLib.dll wrapper around the Info Zip libraries. So, I quickly wrote this utility to scan a folder of jar's (which are just zip files anyway) for a class provided on the command line. It proved so useful that I still use it occasionally.</p>

<p>It is a simple C# console application. To use it, here is the syntax:</p>
<pre>
FindClass ClassNameToFind c:\SomeFolder\SomeJavaApp\lib
</pre><p><br /> </p>

<p>The utility will then list all of the jar files in the folder. Then, it will tell you when it finds the class file in one of the jar's. <br />
 <br />
However useful it may be, I never really updated it with any fancy features. <a href="http://www.zipscan.co.uk/" target="_blank">There are other utilities</a> which other jar-heads use for this feature. But if you like a simple, and free, utility to find those elusive classes, you can <a href="http://www.floydwalker.com/files/FindClass.zip" target="_blank">download it here</a>.</p><div class="item_footer"><p><small><a href="http://www.floydwalker.com/Index.php?title=findclass-a-simple-utility-to-find-a-java-class-in-a-folder-of-jars&amp;more=1&amp;c=1&amp;tb=1&amp;pb=1">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://www.floydwalker.com/Index.php?title=findclass-a-simple-utility-to-find-a-java-class-in-a-folder-of-jars&amp;more=1&amp;c=1&amp;tb=1&amp;pb=1#comments</comments>
			<wfw:commentRss>http://www.floydwalker.com/Index.php?tempskin=_rss2&#38;disp=comments&#38;p=110</wfw:commentRss>
		</item>
				<item>
			<title>FWZipLib.dll: A C++.NET Zip Compression Library Wrapper Around Info Zip</title>
			<link>http://www.floydwalker.com/Index.php?title=fwziplib-dll-a-c-net-zip-compression-library-wrapper-around-info-zip&amp;more=1&amp;c=1&amp;tb=1&amp;pb=1</link>
			<pubDate>Thu, 15 Apr 2010 11:57:41 +0000</pubDate>			<dc:creator>Floyd</dc:creator>
			<category domain="main">.NET</category>			<guid isPermaLink="false">109@http://www.floydwalker.com/</guid>
						<description>&lt;p&gt;Had enough with the portal tools? Well, here is a simple tool I made a long time ago someone may find useful.&lt;/p&gt;

&lt;p&gt;The FWZipLib is a C++ DLL wrapper around the venerable &lt;a href=&quot;http://www.info-zip.org&quot; target=&quot;_blank&quot;&gt;Info Zip&lt;/a&gt; library for Windows. This makes this library accesible to .NET applications. It can do all of the standard operations on zip files: compression, decompression, listing of zip file contents, password protection, etc. Basically, just about anything the Info Zip library can do.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Hold On a Minute&lt;/b&gt;&lt;br /&gt;
There are a couple of things you must know before using this library. First, there are much better libraries out there for .NET. (&lt;a href=&quot;http://www.icsharpcode.net/OpenSource/SharpZipLib/&quot; target=&quot;_blank&quot;&gt;Particularly the SharpZipLib.&lt;/a&gt;) &lt;br /&gt;
Second, I really don't think that it is all that thread-safe. (I haven't really tested it.)  If you need it for small one-off utility programs, console or forms applications it will probably work fine. &lt;/p&gt;

&lt;p&gt;&lt;b&gt;Usage&lt;/b&gt;&lt;br /&gt;
To use it in your average C# program, just reference the FWZipLib.dll. Then, make sure you copy the Zip.dll and UnZip.dll files into your bin folder. These are the Info Zip libraries which actually do the work. The FWZipLib.dll provides the interface to the Info Zip dll's.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;The Download&lt;/b&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.floydwalker.com/files/FWZipLib.zip&quot; target=&quot;_blank&quot;&gt;The download includes the source code and the compiled binary for the FWZipLib.dll.&lt;/a&gt; It also contains a VB.NET test client to show you how the syntax works.&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://www.floydwalker.com/Index.php?title=fwziplib-dll-a-c-net-zip-compression-library-wrapper-around-info-zip&amp;amp;more=1&amp;amp;c=1&amp;amp;tb=1&amp;amp;pb=1&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>Had enough with the portal tools? Well, here is a simple tool I made a long time ago someone may find useful.</p>

<p>The FWZipLib is a C++ DLL wrapper around the venerable <a href="http://www.info-zip.org" target="_blank">Info Zip</a> library for Windows. This makes this library accesible to .NET applications. It can do all of the standard operations on zip files: compression, decompression, listing of zip file contents, password protection, etc. Basically, just about anything the Info Zip library can do.</p>

<p><b>Hold On a Minute</b><br />
There are a couple of things you must know before using this library. First, there are much better libraries out there for .NET. (<a href="http://www.icsharpcode.net/OpenSource/SharpZipLib/" target="_blank">Particularly the SharpZipLib.</a>) <br />
Second, I really don't think that it is all that thread-safe. (I haven't really tested it.)  If you need it for small one-off utility programs, console or forms applications it will probably work fine. </p>

<p><b>Usage</b><br />
To use it in your average C# program, just reference the FWZipLib.dll. Then, make sure you copy the Zip.dll and UnZip.dll files into your bin folder. These are the Info Zip libraries which actually do the work. The FWZipLib.dll provides the interface to the Info Zip dll's.</p>

<p><b>The Download</b><br />
<a href="http://www.floydwalker.com/files/FWZipLib.zip" target="_blank">The download includes the source code and the compiled binary for the FWZipLib.dll.</a> It also contains a VB.NET test client to show you how the syntax works.</p><div class="item_footer"><p><small><a href="http://www.floydwalker.com/Index.php?title=fwziplib-dll-a-c-net-zip-compression-library-wrapper-around-info-zip&amp;more=1&amp;c=1&amp;tb=1&amp;pb=1">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://www.floydwalker.com/Index.php?title=fwziplib-dll-a-c-net-zip-compression-library-wrapper-around-info-zip&amp;more=1&amp;c=1&amp;tb=1&amp;pb=1#comments</comments>
			<wfw:commentRss>http://www.floydwalker.com/Index.php?tempskin=_rss2&#38;disp=comments&#38;p=109</wfw:commentRss>
		</item>
				<item>
			<title>ALUI Publisher Template Copy Command-Line Utility</title>
			<link>http://www.floydwalker.com/Index.php?title=alui-publisher-template-copy-command-line-utility&amp;more=1&amp;c=1&amp;tb=1&amp;pb=1</link>
			<pubDate>Thu, 08 Apr 2010 05:38:11 +0000</pubDate>			<dc:creator>Floyd</dc:creator>
			<category domain="main">WCI</category>
<category domain="alt">.NET</category>			<guid isPermaLink="false">108@http://www.floydwalker.com/</guid>
						<description>&lt;p&gt;The &lt;a href=&quot;http://www.floydwalker.com/Index.php?title=alui-publisher-aquot-plusaquot-portlet-pack-the-edit-in-place-portlets&amp;amp;more=1&amp;amp;c=1&amp;amp;tb=1&amp;amp;pb=1&quot; target=&quot;_blank&quot;&gt;Edit-in-Place portlets&lt;/a&gt; were a great idea. But once users started actually using them, of course some bugs in the presentation templates upon which they were based emerged. This was quite a problem because hundreds of portlets had already been created. Using Publisher Explorer to fix each of the presentation templates was simply out of the question.&lt;/p&gt;

&lt;p&gt;Necessity being the mother of invention, I rolled out the TemplateCopy command-line utilty. What this fella does is seek out all presentation templates of a specific name, and/or with a certain HTML comment tag in the first line, and replace it with a text file provided on the command line. After replacing the presentation template, it can automatically publish the results. &lt;/p&gt;

&lt;p&gt;This has been a useful utility. It really saved our bacon once. Then, it provided a convenient way to roll out changes to portlets and content based upon presentation templates. &lt;/p&gt;

&lt;p&gt;If you are an extensive user of Publisher and have a similar problem, this tool may save you from getting carpal-tunnel syndrome from changing presentation templates in Publisher Explorer.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.floydwalker.com/files/TemplateCopy.zip&quot; target=&quot;_blank&quot;&gt;Here is the link to add this to your toolbox.&lt;/a&gt;&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://www.floydwalker.com/Index.php?title=alui-publisher-template-copy-command-line-utility&amp;amp;more=1&amp;amp;c=1&amp;amp;tb=1&amp;amp;pb=1&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>The <a href="http://www.floydwalker.com/Index.php?title=alui-publisher-aquot-plusaquot-portlet-pack-the-edit-in-place-portlets&amp;more=1&amp;c=1&amp;tb=1&amp;pb=1" target="_blank">Edit-in-Place portlets</a> were a great idea. But once users started actually using them, of course some bugs in the presentation templates upon which they were based emerged. This was quite a problem because hundreds of portlets had already been created. Using Publisher Explorer to fix each of the presentation templates was simply out of the question.</p>

<p>Necessity being the mother of invention, I rolled out the TemplateCopy command-line utilty. What this fella does is seek out all presentation templates of a specific name, and/or with a certain HTML comment tag in the first line, and replace it with a text file provided on the command line. After replacing the presentation template, it can automatically publish the results. </p>

<p>This has been a useful utility. It really saved our bacon once. Then, it provided a convenient way to roll out changes to portlets and content based upon presentation templates. </p>

<p>If you are an extensive user of Publisher and have a similar problem, this tool may save you from getting carpal-tunnel syndrome from changing presentation templates in Publisher Explorer.</p>

<p><a href="http://www.floydwalker.com/files/TemplateCopy.zip" target="_blank">Here is the link to add this to your toolbox.</a></p><div class="item_footer"><p><small><a href="http://www.floydwalker.com/Index.php?title=alui-publisher-template-copy-command-line-utility&amp;more=1&amp;c=1&amp;tb=1&amp;pb=1">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://www.floydwalker.com/Index.php?title=alui-publisher-template-copy-command-line-utility&amp;more=1&amp;c=1&amp;tb=1&amp;pb=1#comments</comments>
			<wfw:commentRss>http://www.floydwalker.com/Index.php?tempskin=_rss2&#38;disp=comments&#38;p=108</wfw:commentRss>
		</item>
				<item>
			<title>ALUI Publisher &#34;Plus&#34; Portlet Pack -- The Edit-In-Place Portlets</title>
			<link>http://www.floydwalker.com/Index.php?title=alui-publisher-aquot-plusaquot-portlet-pack-the-edit-in-place-portlets&amp;more=1&amp;c=1&amp;tb=1&amp;pb=1</link>
			<pubDate>Thu, 08 Apr 2010 04:50:05 +0000</pubDate>			<dc:creator>Floyd</dc:creator>
			<category domain="main">WCI</category>			<guid isPermaLink="false">107@http://www.floydwalker.com/</guid>
						<description>&lt;p&gt;The Oracle WCI / ALUI Publisher product allows the content administrator great freedom to create modify and publish rich content to the portal. The out-of-the-box Announcement and news portlet templates are the main avenues to create portlets and have Publisher content hosted in them. The Announcement portlet is just a container for HTML content. The News portlet is more like a container for blog-like HTML content.&lt;/p&gt;

&lt;p&gt;The difficulty is that the content administrator will eventually need to get aquainted with Publisher Explorer if they are really going to be effective. I have seen that this is a major turn-off to users and sometimes an impediment for user acceptance of Publihser as a tool they want to use.&lt;/p&gt;

&lt;p&gt;The Publisher &amp;quot;Plus&amp;quot; Portlet Pack was created to target this problem. These portlet templates allow the community/content administrator to create portlets and place them on the community page without having to know anything about how Publisher is working. The editing and publishing of content is done in the portlet. If the user has Edit activity level rights on the portlet, a toolbar appears at the top allowing them to manage the content. The really great thing is that the content contributor can see and edit the content in the context in which it will ultimately be viewed.&lt;/p&gt;

&lt;h3&gt;Meet the Cast&lt;/h3&gt;
&lt;p&gt;&lt;b&gt;Announcement Plus&lt;/b&gt;&lt;br /&gt;
The Announcement Plus porltet template is there for you if you just need to put some simple HTML content into a portlet. It has all the great features of the Announcment portlet: WYSIWYG editing, image uploading, etc. The plus is the fact that you can edit it on the portal page.&lt;br /&gt;
The following images show what it looks like in the portal when the user has only Read rights. The next image shows what it looks like when the user has Edit rights. Notice the toolbar across the top. The &quot;Edit Portlet&quot; link opens up the Publisher window, allowing the user to check out, edit, and publish the content. &lt;br /&gt;
Note: Since the portlet is designed to show just about any HTML content, I have filled these with &lt;a href=&quot;http://en.wikipedia.org/wiki/Lorem_ipsum&quot; target=&quot;_blank&quot;&gt;Lorem Ipsum&lt;/a&gt; filler text.&lt;/p&gt;


&lt;p&gt;&lt;img src=&quot;http://www.floydwalker.com/files/PubPlus/PP-AnnPE.png&quot; alt=&quot;Announcement Plus Portlet -- View Only&quot; border=&quot;0&quot; width=&quot;530&quot; /&gt;&lt;br /&gt;
&lt;b&gt;&lt;i&gt;Announcement Plus Portlet -- View Only&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;


&lt;p&gt;&lt;img src=&quot;http://www.floydwalker.com/files/PubPlus/PP-AnnPV.png&quot; alt=&quot;Announcement Plus Portlet -- Edit Enabled&quot; border=&quot;0&quot; width=&quot;530&quot; /&gt;&lt;br /&gt;
&lt;b&gt;&lt;i&gt;Announcement Plus Portlet -- Edit Enabled&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;


&lt;p&gt;&lt;b&gt;News Plus&lt;/b&gt;&lt;br /&gt;
The News Plus portlet template, much like the old News portlet, is a container for some HTML content above a list of links to other HTML documents. It also sports an optional image which can float to the right of the document links.&lt;/p&gt;

&lt;p&gt;Here are a couple of images to show how it might look in the portal. Again, notice the toolbar above the content when the user has Edit rights to the portlet. Also, each content item has an edit link next to them, allowing the content administrator to change the HTML file to which the portlet is linking. &lt;/p&gt;


&lt;p&gt;&lt;img src=&quot;http://www.floydwalker.com/files/PubPlus/PP-NewsPV.png&quot; alt=&quot;News Plus Portlet -- View Only&quot; border=&quot;0&quot; width=&quot;530&quot; /&gt;&lt;br /&gt;
&lt;b&gt;&lt;i&gt;News Plus Portlet -- View Only&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;


&lt;p&gt;&lt;img src=&quot;http://www.floydwalker.com/files/PubPlus/PP-NewsPE.png&quot; alt=&quot;News Plus Portlet -- Edit Enabled&quot; border=&quot;0&quot; width=&quot;530&quot; /&gt;&lt;br /&gt;
&lt;b&gt;&lt;i&gt;News Plus Portlet -- Edit Enabled&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;


&lt;p&gt;At the bottom of the portlet is a section which only appears in Edit mode, when there are unpublished HTML documents. This allows the content administrator to polish the document before publishing it to the public.&lt;/p&gt;

&lt;p&gt;Here are some of this portlet's features:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;An optional block of HTML (or rich text) can appear at the top of the list of messages.
&lt;/li&gt;&lt;li&gt;An optional image can be placed so that it floats to the right of the list of messages.
&lt;/li&gt;&lt;li&gt;The editor can change the number of messages to display at a time in the portlet. If the number of messages exceeds the specified number, a &amp;#8220;View All&amp;#8230;&amp;#8221; link appears. 
&lt;/li&gt;&lt;li&gt;An optional message abstract can be provided. (See the first message item  in the images above.)
&lt;/li&gt;&lt;li&gt;An optional search textbox and button can appear, letting the user search for a specific message in the list.
&lt;/li&gt;&lt;li&gt;If a user creates a message item, but doesn&amp;#8217;t publish it, it will not display in the normal list. In order to edit it, a list of &amp;#8220;Unpublished Content Items&amp;#8221; will appear below the normal list for users with EDIT privileges. 
&lt;/li&gt;&lt;li&gt;Changes to the message items will not appear to all the users unless the containing portlet is published as well as the message itself. To make this easier for the content editor, a &amp;#8220;Publish&amp;#8221; button is provided in the action bar.
&lt;/li&gt;&lt;li&gt;The publish dates of the messages can also be displayed if the option is chosen. (Not shown.)
&lt;/li&gt;&lt;/ol&gt;

&lt;p&gt;&lt;b&gt;Links Plus Portlet&lt;/b&gt;&lt;br /&gt;
One of the most frequent portlet requests by customers has always been portlets where users can manage their links. I don't have enough fingers to count the many links portlets I have seen. Well, here is my version (or at least one of them).&lt;/p&gt;

&lt;p&gt;This portlet has all the great features of the News Plus Portlet. That is because it is based on it. But, instead of links to Publisher-managed HTML links, the user can type (or paste) in the links they want. If used with the &lt;a href=&quot;http://www.floydwalker.com/Index.php?title=portlet-to-get-a-link-to-a-wci-or-alui-portal-object&amp;amp;more=1&amp;amp;c=1&amp;amp;tb=1&amp;amp;pb=1&quot; target=&quot;_blank&quot;&gt;Get Portal Link portlet&lt;/a&gt;, the user can easily create links to interesting places in the portal.&lt;/p&gt;


&lt;p&gt;&lt;img src=&quot;http://www.floydwalker.com/files/PubPlus/PP-LinksPV.png&quot; alt=&quot;Links Plus Portlet -- View Only&quot; border=&quot;0&quot; width=&quot;530&quot; /&gt;&lt;br /&gt;
&lt;b&gt;&lt;i&gt;Links Plus Portlet -- View Only&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;


&lt;p&gt;&lt;img src=&quot;http://www.floydwalker.com/files/PubPlus/PP-LinksPE.png&quot; alt=&quot;Links Plus Portlet -- Edit Enabled&quot; border=&quot;0&quot; width=&quot;530&quot; /&gt;&lt;br /&gt;
&lt;b&gt;&lt;i&gt;Links Plus Portlet -- Edit Enabled&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;In case I forget, here is the list of features for this portlet:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;An optional block of HTML (or rich text) can appear at the top of the list of links. (Shown in the View Only image.)
&lt;/li&gt;&lt;li&gt;An optional image can be placed so that it floats to the right of the list of links. (Shown in the Edit Enabled image).
&lt;/li&gt;&lt;li&gt;The editor can change the number of links to display at a time in the portlet. If the number of links exceeds the specified number, a &amp;#8220;View All&amp;#8230;&amp;#8221; link appears. (Shown in the Edit Enabled image)
&lt;/li&gt;&lt;li&gt;An optional link description can be provided. (See the second link in the Edit Enabled image.)
&lt;/li&gt;&lt;li&gt;An optional search textbox and button can appear, letting the user search for a specific link in the list.
&lt;/li&gt;&lt;li&gt;If a user creates a link, but doesn&amp;#8217;t publish it, it will not display in the normal list. In order to edit it, a list of &amp;#8220;Unpublished Content Items&amp;#8221; will appear below the normal list for users with EDIT privileges. (Shown in the Edit Enabled image)
&lt;/li&gt;&lt;li&gt;Changes to the link items will not appear to all the users unless the containing portlet is published as well as the link itself. To make this easier for the content editor, a &amp;#8220;Publish&amp;#8221; button is provided in the action bar. (Shown in the Edit Enabled image)
&lt;/li&gt;&lt;li&gt;The order of links can be set by changing the &amp;quot;Name&amp;quot; attribute of the link items. This value is not displayed in the portlet.
&lt;/li&gt;&lt;/ol&gt;

&lt;p&gt;&lt;b&gt;Image Links Plus Portlet&lt;/b&gt;&lt;br /&gt;
The fun continues with the Image Link Plus portlet template. Actually, I did have a bit of fun with this one. &lt;/p&gt;

&lt;p&gt;I thought it would be neat to have the links from the Links Plus Portlet appear like the icons appear in the Tile View of the Microsoft Windows File Explorer or the Icon View of Apple's OS X Finder. At the time, I was playing around the the CSS float style. The result: the Image Links Plus portlet. It really doesn't have a great use case. I just thought it was cool.&lt;/p&gt;

&lt;p&gt;The images show up from left to right, top to bottom. They float around the available space in the portlet as the user changes the width of the browser. The dimensions of each link can be specified by the content adminiatrator to help control how the links float around each other.&lt;br /&gt;
  &lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.floydwalker.com/files/PubPlus/PP-ImgLinksPV.png&quot; alt=&quot;Image Links Plus Portlet -- View Only&quot; border=&quot;0&quot; /&gt;&lt;br /&gt;
&lt;b&gt;&lt;i&gt;Image Links Plus Portlet -- View Only&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.floydwalker.com/files/PubPlus/PP-ImgLinksPE.png&quot; alt=&quot;Image Links Plus Portlet -- Edit Enabled&quot; border=&quot;0&quot; /&gt;&lt;br /&gt;
&lt;b&gt;&lt;i&gt;Image Links Plus Portlet -- Edit Enabled&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;


&lt;p&gt;This portlet has all of the features of the Links Plus Portlet, from which it was derived. &lt;/p&gt;


&lt;p&gt;&lt;b&gt;The Adaptive Content Portlet Pair&lt;/b&gt;&lt;br /&gt;
I got bored one day watching my compiler messages roll past when I thought of this one. What if you had a News Plus portlet on one side of a portal page and another portlet on the other. When the user clicks on one of the content links in the News Plus portlet, instead of having the HTML content pop up in another window, wouldn't it be cool to have the content appear in the other portlet. Kind of like a master-detail relationship. Think of the cool things users could do with that!&lt;/p&gt;

&lt;p&gt;So, I twisted Publisher's arm a bit, sprinkled a little JavaScript around, and practiced my favorite curse words. Finally, I got this baby to work.&lt;/p&gt;

&lt;p&gt;There are two portlet templates you will need to get this to work: Adaptive Conetent Master (the modified News Plus portlet), and Adaptive Content Detail (the portlet where the content will be loaded). Here are some images for you to get the idea.&lt;/p&gt;


&lt;p&gt;&lt;img src=&quot;http://www.floydwalker.com/files/PubPlus/PP-AdCont1V.png&quot; width=&quot;530&quot; alt=&quot;Adaptive Content Portlets, Initial Page Load -- View Only&quot; border=&quot;0&quot; /&gt;&lt;br /&gt;
&lt;b&gt;&lt;i&gt;Adaptive Content Portlets, Initial Page Load -- View Only&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;


&lt;p&gt;&lt;img src=&quot;http://www.floydwalker.com/files/PubPlus/PP-AdCont1E.png&quot; width=&quot;530&quot; alt=&quot;Adaptive Content Portlets, Initial Page Load -- Edit Enabled&quot; border=&quot;0&quot; /&gt;&lt;br /&gt;
&lt;b&gt;&lt;i&gt;Adaptive Content Portlets, Initial Page Load -- Edit Enabled&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;


&lt;p&gt;You will notice that, unlike the News Plus Portlet, the content items do not have edit links next to them. That is because, in the spirit of all of the Publisher Plus Portlets, you edit the target content in place, in the Adaptive Content Detail portlet.&lt;/p&gt;


&lt;p&gt;&lt;img src=&quot;http://www.floydwalker.com/files/PubPlus/PP-AdCont2V.png&quot; width=&quot;530&quot; alt=&quot;Adaptive Content Portlets, Content Item Selected -- View Only&quot; border=&quot;0&quot; /&gt;&lt;br /&gt;
&lt;b&gt;&lt;i&gt;Adaptive Content Portlets, Content Item Selected -- View Only&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;


&lt;p&gt;&lt;img src=&quot;http://www.floydwalker.com/files/PubPlus/PP-AdCont2E.png&quot; width=&quot;530&quot; alt=&quot;Adaptive Content Portlets, Content Item Selected -- Edit Enabled&quot; border=&quot;0&quot; /&gt;&lt;br /&gt;
&lt;b&gt;&lt;i&gt;Adaptive Content Portlets, Content Item Selected -- Edit Enabled&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;


&lt;p&gt;If you like, you can have another portlet on the page use the Adaptive Content portlets' JavaScript to load content items into the Adaptive Content Detail portlet by content name. The following image shows this in action (sorta). You can see the HTML portlet at the bottom left of the image, the link with the outline around it has just been clicked. The content has just been loaded in the Adaptive Detail portlet.&lt;/p&gt;


&lt;p&gt;&lt;img src=&quot;http://www.floydwalker.com/files/PubPlus/PP-AdCont3E.png&quot; width=&quot;530&quot; alt=&quot;Adaptive Content Portlets, HTML Access of Content Items&quot; border=&quot;0&quot; /&gt;&lt;br /&gt;
&lt;b&gt;&lt;i&gt;Adaptive Content Portlets, HTML Access of Content Items&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;


&lt;p&gt;Here is the HTML code of the anchor tag shown in the image above.&lt;/p&gt;
&lt;pre&gt;
  &amp;lt;a href=&amp;quot;#&amp;quot; onclick=&amp;quot;get_Content_Item_By_Name('Article1'); return(false);&amp;quot;&amp;gt;viverra nec&amp;lt;/a&amp;gt;
&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;


&lt;p&gt;&lt;b&gt;Seen Enough?&lt;/b&gt;&lt;br /&gt;
Working with Publisher can be quite the challenge. And, I don't know what the future holds for the dated product. But, if you are interested in using these portlets, &lt;a href=&quot;http://www.floydwalker.com/files/EditInPlacePortlets.zip&quot; target=&quot;_blank&quot;&gt;you can download from here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Note: These portlets require the &lt;a href=&quot;http://www.floydwalker.com/Index.php?title=fpw-useractivitylevel-custom-adaptive-ta&amp;amp;more=1&amp;amp;c=1&amp;amp;tb=1&amp;amp;pb=1&quot; target=&quot;_blank&quot;&gt;fpw.useractivitylevel custom tag&lt;/a&gt; in order to determine user access rights to the portlets. If you don't like the portal modification, you can always replace this tag with &lt;a href=&quot;http://download.oracle.com/docs/cd/E13158_01/alui/wci/docs103/devguide/tsk_tags_standard_securingcontent.html&quot; target=&quot;_blank&quot;&gt;the more traditional method&lt;/a&gt;, by editing all of the presentation templates.&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://www.floydwalker.com/Index.php?title=alui-publisher-aquot-plusaquot-portlet-pack-the-edit-in-place-portlets&amp;amp;more=1&amp;amp;c=1&amp;amp;tb=1&amp;amp;pb=1&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>The Oracle WCI / ALUI Publisher product allows the content administrator great freedom to create modify and publish rich content to the portal. The out-of-the-box Announcement and news portlet templates are the main avenues to create portlets and have Publisher content hosted in them. The Announcement portlet is just a container for HTML content. The News portlet is more like a container for blog-like HTML content.</p>

<p>The difficulty is that the content administrator will eventually need to get aquainted with Publisher Explorer if they are really going to be effective. I have seen that this is a major turn-off to users and sometimes an impediment for user acceptance of Publihser as a tool they want to use.</p>

<p>The Publisher &quot;Plus&quot; Portlet Pack was created to target this problem. These portlet templates allow the community/content administrator to create portlets and place them on the community page without having to know anything about how Publisher is working. The editing and publishing of content is done in the portlet. If the user has Edit activity level rights on the portlet, a toolbar appears at the top allowing them to manage the content. The really great thing is that the content contributor can see and edit the content in the context in which it will ultimately be viewed.</p>

<h3>Meet the Cast</h3>
<p><b>Announcement Plus</b><br />
The Announcement Plus porltet template is there for you if you just need to put some simple HTML content into a portlet. It has all the great features of the Announcment portlet: WYSIWYG editing, image uploading, etc. The plus is the fact that you can edit it on the portal page.<br />
The following images show what it looks like in the portal when the user has only Read rights. The next image shows what it looks like when the user has Edit rights. Notice the toolbar across the top. The "Edit Portlet" link opens up the Publisher window, allowing the user to check out, edit, and publish the content. <br />
Note: Since the portlet is designed to show just about any HTML content, I have filled these with <a href="http://en.wikipedia.org/wiki/Lorem_ipsum" target="_blank">Lorem Ipsum</a> filler text.</p>


<p><img src="http://www.floydwalker.com/files/PubPlus/PP-AnnPE.png" alt="Announcement Plus Portlet -- View Only" border="0" width="530" /><br />
<b><i>Announcement Plus Portlet -- View Only</i></b></p>


<p><img src="http://www.floydwalker.com/files/PubPlus/PP-AnnPV.png" alt="Announcement Plus Portlet -- Edit Enabled" border="0" width="530" /><br />
<b><i>Announcement Plus Portlet -- Edit Enabled</i></b></p>


<p><b>News Plus</b><br />
The News Plus portlet template, much like the old News portlet, is a container for some HTML content above a list of links to other HTML documents. It also sports an optional image which can float to the right of the document links.</p>

<p>Here are a couple of images to show how it might look in the portal. Again, notice the toolbar above the content when the user has Edit rights to the portlet. Also, each content item has an edit link next to them, allowing the content administrator to change the HTML file to which the portlet is linking. </p>


<p><img src="http://www.floydwalker.com/files/PubPlus/PP-NewsPV.png" alt="News Plus Portlet -- View Only" border="0" width="530" /><br />
<b><i>News Plus Portlet -- View Only</i></b></p>


<p><img src="http://www.floydwalker.com/files/PubPlus/PP-NewsPE.png" alt="News Plus Portlet -- Edit Enabled" border="0" width="530" /><br />
<b><i>News Plus Portlet -- Edit Enabled</i></b></p>


<p>At the bottom of the portlet is a section which only appears in Edit mode, when there are unpublished HTML documents. This allows the content administrator to polish the document before publishing it to the public.</p>

<p>Here are some of this portlet's features:</p>
<ol>
<li>An optional block of HTML (or rich text) can appear at the top of the list of messages.
</li><li>An optional image can be placed so that it floats to the right of the list of messages.
</li><li>The editor can change the number of messages to display at a time in the portlet. If the number of messages exceeds the specified number, a &#8220;View All&#8230;&#8221; link appears. 
</li><li>An optional message abstract can be provided. (See the first message item  in the images above.)
</li><li>An optional search textbox and button can appear, letting the user search for a specific message in the list.
</li><li>If a user creates a message item, but doesn&#8217;t publish it, it will not display in the normal list. In order to edit it, a list of &#8220;Unpublished Content Items&#8221; will appear below the normal list for users with EDIT privileges. 
</li><li>Changes to the message items will not appear to all the users unless the containing portlet is published as well as the message itself. To make this easier for the content editor, a &#8220;Publish&#8221; button is provided in the action bar.
</li><li>The publish dates of the messages can also be displayed if the option is chosen. (Not shown.)
</li></ol>

<p><b>Links Plus Portlet</b><br />
One of the most frequent portlet requests by customers has always been portlets where users can manage their links. I don't have enough fingers to count the many links portlets I have seen. Well, here is my version (or at least one of them).</p>

<p>This portlet has all the great features of the News Plus Portlet. That is because it is based on it. But, instead of links to Publisher-managed HTML links, the user can type (or paste) in the links they want. If used with the <a href="http://www.floydwalker.com/Index.php?title=portlet-to-get-a-link-to-a-wci-or-alui-portal-object&amp;more=1&amp;c=1&amp;tb=1&amp;pb=1" target="_blank">Get Portal Link portlet</a>, the user can easily create links to interesting places in the portal.</p>


<p><img src="http://www.floydwalker.com/files/PubPlus/PP-LinksPV.png" alt="Links Plus Portlet -- View Only" border="0" width="530" /><br />
<b><i>Links Plus Portlet -- View Only</i></b></p>


<p><img src="http://www.floydwalker.com/files/PubPlus/PP-LinksPE.png" alt="Links Plus Portlet -- Edit Enabled" border="0" width="530" /><br />
<b><i>Links Plus Portlet -- Edit Enabled</i></b></p>

<p>In case I forget, here is the list of features for this portlet:</p>
<ol>
<li>An optional block of HTML (or rich text) can appear at the top of the list of links. (Shown in the View Only image.)
</li><li>An optional image can be placed so that it floats to the right of the list of links. (Shown in the Edit Enabled image).
</li><li>The editor can change the number of links to display at a time in the portlet. If the number of links exceeds the specified number, a &#8220;View All&#8230;&#8221; link appears. (Shown in the Edit Enabled image)
</li><li>An optional link description can be provided. (See the second link in the Edit Enabled image.)
</li><li>An optional search textbox and button can appear, letting the user search for a specific link in the list.
</li><li>If a user creates a link, but doesn&#8217;t publish it, it will not display in the normal list. In order to edit it, a list of &#8220;Unpublished Content Items&#8221; will appear below the normal list for users with EDIT privileges. (Shown in the Edit Enabled image)
</li><li>Changes to the link items will not appear to all the users unless the containing portlet is published as well as the link itself. To make this easier for the content editor, a &#8220;Publish&#8221; button is provided in the action bar. (Shown in the Edit Enabled image)
</li><li>The order of links can be set by changing the &quot;Name&quot; attribute of the link items. This value is not displayed in the portlet.
</li></ol>

<p><b>Image Links Plus Portlet</b><br />
The fun continues with the Image Link Plus portlet template. Actually, I did have a bit of fun with this one. </p>

<p>I thought it would be neat to have the links from the Links Plus Portlet appear like the icons appear in the Tile View of the Microsoft Windows File Explorer or the Icon View of Apple's OS X Finder. At the time, I was playing around the the CSS float style. The result: the Image Links Plus portlet. It really doesn't have a great use case. I just thought it was cool.</p>

<p>The images show up from left to right, top to bottom. They float around the available space in the portlet as the user changes the width of the browser. The dimensions of each link can be specified by the content adminiatrator to help control how the links float around each other.<br />
  </p>

<p><img src="http://www.floydwalker.com/files/PubPlus/PP-ImgLinksPV.png" alt="Image Links Plus Portlet -- View Only" border="0" /><br />
<b><i>Image Links Plus Portlet -- View Only</i></b></p>

<p><img src="http://www.floydwalker.com/files/PubPlus/PP-ImgLinksPE.png" alt="Image Links Plus Portlet -- Edit Enabled" border="0" /><br />
<b><i>Image Links Plus Portlet -- Edit Enabled</i></b></p>


<p>This portlet has all of the features of the Links Plus Portlet, from which it was derived. </p>


<p><b>The Adaptive Content Portlet Pair</b><br />
I got bored one day watching my compiler messages roll past when I thought of this one. What if you had a News Plus portlet on one side of a portal page and another portlet on the other. When the user clicks on one of the content links in the News Plus portlet, instead of having the HTML content pop up in another window, wouldn't it be cool to have the content appear in the other portlet. Kind of like a master-detail relationship. Think of the cool things users could do with that!</p>

<p>So, I twisted Publisher's arm a bit, sprinkled a little JavaScript around, and practiced my favorite curse words. Finally, I got this baby to work.</p>

<p>There are two portlet templates you will need to get this to work: Adaptive Conetent Master (the modified News Plus portlet), and Adaptive Content Detail (the portlet where the content will be loaded). Here are some images for you to get the idea.</p>


<p><img src="http://www.floydwalker.com/files/PubPlus/PP-AdCont1V.png" width="530" alt="Adaptive Content Portlets, Initial Page Load -- View Only" border="0" /><br />
<b><i>Adaptive Content Portlets, Initial Page Load -- View Only</i></b></p>


<p><img src="http://www.floydwalker.com/files/PubPlus/PP-AdCont1E.png" width="530" alt="Adaptive Content Portlets, Initial Page Load -- Edit Enabled" border="0" /><br />
<b><i>Adaptive Content Portlets, Initial Page Load -- Edit Enabled</i></b></p>


<p>You will notice that, unlike the News Plus Portlet, the content items do not have edit links next to them. That is because, in the spirit of all of the Publisher Plus Portlets, you edit the target content in place, in the Adaptive Content Detail portlet.</p>


<p><img src="http://www.floydwalker.com/files/PubPlus/PP-AdCont2V.png" width="530" alt="Adaptive Content Portlets, Content Item Selected -- View Only" border="0" /><br />
<b><i>Adaptive Content Portlets, Content Item Selected -- View Only</i></b></p>


<p><img src="http://www.floydwalker.com/files/PubPlus/PP-AdCont2E.png" width="530" alt="Adaptive Content Portlets, Content Item Selected -- Edit Enabled" border="0" /><br />
<b><i>Adaptive Content Portlets, Content Item Selected -- Edit Enabled</i></b></p>


<p>If you like, you can have another portlet on the page use the Adaptive Content portlets' JavaScript to load content items into the Adaptive Content Detail portlet by content name. The following image shows this in action (sorta). You can see the HTML portlet at the bottom left of the image, the link with the outline around it has just been clicked. The content has just been loaded in the Adaptive Detail portlet.</p>


<p><img src="http://www.floydwalker.com/files/PubPlus/PP-AdCont3E.png" width="530" alt="Adaptive Content Portlets, HTML Access of Content Items" border="0" /><br />
<b><i>Adaptive Content Portlets, HTML Access of Content Items</i></b></p>


<p>Here is the HTML code of the anchor tag shown in the image above.</p>
<pre>
  &lt;a href=&quot;#&quot; onclick=&quot;get_Content_Item_By_Name('Article1'); return(false);&quot;&gt;viverra nec&lt;/a&gt;
</pre><p><br /></p>


<p><b>Seen Enough?</b><br />
Working with Publisher can be quite the challenge. And, I don't know what the future holds for the dated product. But, if you are interested in using these portlets, <a href="http://www.floydwalker.com/files/EditInPlacePortlets.zip" target="_blank">you can download from here</a>.</p>

<p>Note: These portlets require the <a href="http://www.floydwalker.com/Index.php?title=fpw-useractivitylevel-custom-adaptive-ta&amp;more=1&amp;c=1&amp;tb=1&amp;pb=1" target="_blank">fpw.useractivitylevel custom tag</a> in order to determine user access rights to the portlets. If you don't like the portal modification, you can always replace this tag with <a href="http://download.oracle.com/docs/cd/E13158_01/alui/wci/docs103/devguide/tsk_tags_standard_securingcontent.html" target="_blank">the more traditional method</a>, by editing all of the presentation templates.</p><div class="item_footer"><p><small><a href="http://www.floydwalker.com/Index.php?title=alui-publisher-aquot-plusaquot-portlet-pack-the-edit-in-place-portlets&amp;more=1&amp;c=1&amp;tb=1&amp;pb=1">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://www.floydwalker.com/Index.php?title=alui-publisher-aquot-plusaquot-portlet-pack-the-edit-in-place-portlets&amp;more=1&amp;c=1&amp;tb=1&amp;pb=1#comments</comments>
			<wfw:commentRss>http://www.floydwalker.com/Index.php?tempskin=_rss2&#38;disp=comments&#38;p=107</wfw:commentRss>
		</item>
				<item>
			<title>FPW.UserActivityLevel Custom Adaptive Tag for WCI</title>
			<link>http://www.floydwalker.com/Index.php?title=fpw-useractivitylevel-custom-adaptive-ta&amp;more=1&amp;c=1&amp;tb=1&amp;pb=1</link>
			<pubDate>Wed, 07 Apr 2010 04:49:29 +0000</pubDate>			<dc:creator>Floyd</dc:creator>
			<category domain="main">WCI</category>
<category domain="alt">.NET</category>			<guid isPermaLink="false">105@http://www.floydwalker.com/</guid>
						<description>&lt;p&gt;The WCI / ALUI portal has some pretty neat ways to deliver dynamic content. Using Adaptive Tags you can insert some of the portal's intelligence into your HTML very easily. And, when these tricks are not enough, the native API gives you the tools to make your own.&lt;/p&gt;

&lt;p&gt;Now, I'm not a big fan of the WCI native API. It's largely undocumented, a bit cumbersome, and it is usually one of the biggest  problems portal administrators have to deal with when upgrading to a new version of the portal. But sometimes, you gotta do what you gotta do.&lt;/p&gt;

&lt;p&gt;I needed a way to secure portions of HTML content. &lt;a href=&quot;http://download.oracle.com/docs/cd/E13158_01/alui/wci/docs103/devguide/tsk_tags_standard_securingcontent.html&quot; target=&quot;_blank&quot;&gt;There are ways to do this with Adaptive Tags.&lt;/a&gt; The problem with the way that it was implemented is that you have to hard-code the arbitrary numbers the portal gives to the group and user objects. Which is fine, as long as you don't have to migrate content between portals like you have to do when moving from QA to UAT to Production.&lt;/p&gt;

&lt;p&gt;The fpw.useractivitylevel tag was created to solve this problem. Any HTML content put within the beginning and ending of the tag is only sent to the browser if the user has the appropriate activity rights (Admin, Edit, Select, Read, or None). Thus, the portal or community administrator just needs to set the security levels they want on the portlet, page, or community. The portlet developer or content author does not need to know the ID numbers of who needs to get to the content, just what access levels they should have.  &lt;/p&gt;

&lt;p&gt;&lt;b&gt;Syntax&lt;/b&gt;&lt;br /&gt;
Here is an example of how it looks in the wild.&lt;/p&gt;
&lt;pre&gt;
&amp;lt;pt:fpw.useractivitylevel pt:scope=&amp;quot;GADGET&amp;quot; pt:rettype=&amp;quot;ENGLISH&amp;quot; pt:atleast=&amp;quot;EDIT&amp;quot;&amp;gt;
  Secure content goes here
&amp;lt;/pt:fpw.useractivitylevel&amp;gt;
&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;&lt;br /&gt;
The pt:rettype attribute value can be either &amp;quot;ENGLISH&amp;quot; or &amp;quot;NUMERIC&amp;quot;. &lt;/p&gt;

&lt;p&gt;The pt:scope attribute value determines what object in the scope is used to restrict the content: &amp;quot;COMMUNITY&amp;quot;, &amp;quot;PAGE&amp;quot;, or &amp;quot;GADGET&amp;quot; (portlet). &lt;/p&gt;

&lt;p&gt;The final attribute can be either pt:atleast (the usual) or pt:below depending upon which way you want restrict content, either from less to more secure, or from more secure to less secure. The value of this attribute can be either &amp;quot;ADMIN&amp;quot;, &amp;quot;EDIT&amp;quot;, &amp;quot;SELECT&amp;quot;, &amp;quot;READ&amp;quot;, or &amp;quot;NONE&amp;quot; if pt:rettype is &amp;quot;ENGLISH&amp;quot;. Or, if you want to be more obscure, you can use the numeric ID's by setting the pt:rettype ot &amp;quot;NUMERIC&amp;quot;: 15, 7, 3, 1, or 0. &lt;/p&gt;

&lt;p&gt;&lt;b&gt;Additional Details&lt;/b&gt;&lt;br /&gt;
In order to get some of the security details to the new tag, I also had to modify the MyPortal object.&lt;/p&gt;

&lt;p&gt;Also, this tag was originally written for the v6.0 ALUI portal. When I updated it to the 10g version I noticed that it caused some problems with the new Dojo-based MyPages. Something about a casting problem. &lt;/p&gt;

&lt;p&gt;&lt;b&gt;The Link&lt;/b&gt;&lt;br /&gt;
If you like this idea, you too can have this tag in your portal. &lt;a href=&quot;http://www.floydwalker.com/files/UserActivityLevelTag.zip&quot; target=&quot;_blank&quot;&gt;Get it here.&lt;/a&gt;&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://www.floydwalker.com/Index.php?title=fpw-useractivitylevel-custom-adaptive-ta&amp;amp;more=1&amp;amp;c=1&amp;amp;tb=1&amp;amp;pb=1&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>The WCI / ALUI portal has some pretty neat ways to deliver dynamic content. Using Adaptive Tags you can insert some of the portal's intelligence into your HTML very easily. And, when these tricks are not enough, the native API gives you the tools to make your own.</p>

<p>Now, I'm not a big fan of the WCI native API. It's largely undocumented, a bit cumbersome, and it is usually one of the biggest  problems portal administrators have to deal with when upgrading to a new version of the portal. But sometimes, you gotta do what you gotta do.</p>

<p>I needed a way to secure portions of HTML content. <a href="http://download.oracle.com/docs/cd/E13158_01/alui/wci/docs103/devguide/tsk_tags_standard_securingcontent.html" target="_blank">There are ways to do this with Adaptive Tags.</a> The problem with the way that it was implemented is that you have to hard-code the arbitrary numbers the portal gives to the group and user objects. Which is fine, as long as you don't have to migrate content between portals like you have to do when moving from QA to UAT to Production.</p>

<p>The fpw.useractivitylevel tag was created to solve this problem. Any HTML content put within the beginning and ending of the tag is only sent to the browser if the user has the appropriate activity rights (Admin, Edit, Select, Read, or None). Thus, the portal or community administrator just needs to set the security levels they want on the portlet, page, or community. The portlet developer or content author does not need to know the ID numbers of who needs to get to the content, just what access levels they should have.  </p>

<p><b>Syntax</b><br />
Here is an example of how it looks in the wild.</p>
<pre>
&lt;pt:fpw.useractivitylevel pt:scope=&quot;GADGET&quot; pt:rettype=&quot;ENGLISH&quot; pt:atleast=&quot;EDIT&quot;&gt;
  Secure content goes here
&lt;/pt:fpw.useractivitylevel&gt;
</pre>
<p><br /><br />
The pt:rettype attribute value can be either &quot;ENGLISH&quot; or &quot;NUMERIC&quot;. </p>

<p>The pt:scope attribute value determines what object in the scope is used to restrict the content: &quot;COMMUNITY&quot;, &quot;PAGE&quot;, or &quot;GADGET&quot; (portlet). </p>

<p>The final attribute can be either pt:atleast (the usual) or pt:below depending upon which way you want restrict content, either from less to more secure, or from more secure to less secure. The value of this attribute can be either &quot;ADMIN&quot;, &quot;EDIT&quot;, &quot;SELECT&quot;, &quot;READ&quot;, or &quot;NONE&quot; if pt:rettype is &quot;ENGLISH&quot;. Or, if you want to be more obscure, you can use the numeric ID's by setting the pt:rettype ot &quot;NUMERIC&quot;: 15, 7, 3, 1, or 0. </p>

<p><b>Additional Details</b><br />
In order to get some of the security details to the new tag, I also had to modify the MyPortal object.</p>

<p>Also, this tag was originally written for the v6.0 ALUI portal. When I updated it to the 10g version I noticed that it caused some problems with the new Dojo-based MyPages. Something about a casting problem. </p>

<p><b>The Link</b><br />
If you like this idea, you too can have this tag in your portal. <a href="http://www.floydwalker.com/files/UserActivityLevelTag.zip" target="_blank">Get it here.</a></p><div class="item_footer"><p><small><a href="http://www.floydwalker.com/Index.php?title=fpw-useractivitylevel-custom-adaptive-ta&amp;more=1&amp;c=1&amp;tb=1&amp;pb=1">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://www.floydwalker.com/Index.php?title=fpw-useractivitylevel-custom-adaptive-ta&amp;more=1&amp;c=1&amp;tb=1&amp;pb=1#comments</comments>
			<wfw:commentRss>http://www.floydwalker.com/Index.php?tempskin=_rss2&#38;disp=comments&#38;p=105</wfw:commentRss>
		</item>
			</channel>
</rss>
