<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Custom automation with Seam backing Bean, How long is the SEAM conversation? in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/custom-automation-with-seam-backing-bean-how-long-is-the-seam/m-p/323154#M10155</link>
    <description>&lt;P&gt;I'm attempting to implement a stack which will be available during a long running SEAM conversation. I want to be able to backtrack through the lifecycle states of a document and I'm using the stack to store the previous N states as Strings. The document moves through the lifecycle states and reveals, in the edit view, properties for editing based on the lifecycle state. One of the questions I have is "how long" does the SEAM conversation stay active for a document being edited?&lt;/P&gt;
&lt;P&gt;I've built a simple push and pop automation operations which load and are called correctly. The backing bean was generated using the IDE as a SEAM service bean. I changed the Scope in that bean from event to CONVERSATION.&lt;/P&gt;
&lt;P&gt;The Stack itself is a standard Java stack extended to change the name only.&lt;/P&gt;
&lt;P&gt;I get an null pointer error on the stack reference when I try a PUSH a string onto this custom stack. I am injecting a reference to the stack into the push and pop automation operation classes . It seems the SEAM backing bean is not being initialized.&lt;/P&gt;
&lt;P&gt;Here is the backing bean code and the push and pop classes: The two log messages are never printed in the backing bean, the Push log message getting the previous state from the Document Model prints.&lt;/P&gt;
&lt;P&gt;@Name("bESStateStack")
@Scope(ScopeType.CONVERSATION)
public class BESStateStackBean implements Serializable {&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;private static final long serialVersionUID = 1L;

protected BESStateStack&amp;lt;String&amp;gt; bESStateStack;



private static final Log log = LogFactory.getLog(BESStateStackBean.class);



@Unwrap
public BESStateStack&amp;lt;String&amp;gt; getService() throws Exception {
	log.warn("Getting Service BESStateStackBean");
    if (bESStateStack == null) {
    	log.warn ("Creating BESStateStackBean");
        bESStateStack = Framework.getService(BESStateStack.class);
    }
    return bESStateStack;
}



public BESStateStack&amp;lt;String&amp;gt; getbESStateStack() {
	return bESStateStack;
}



public void setbESStateStack(BESStateStack&amp;lt;String&amp;gt; bESStateStack) {
	this.bESStateStack = bESStateStack;
}
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;@Operation(id=PopBESState.ID, category=Constants.CAT_EXECUTION_STACK, label="PopBESState", description="")
public class PopBESState {&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;public static final String ID = "PopBESState";

@In (value="#{bESStateStack}")
BESStateStack&amp;lt;String&amp;gt; stack;

private static final Log log = LogFactory.getLog(PopBESState.class);



@OperationMethod
public DocumentModel run(DocumentModel input) {
	try {
		String x = (String)stack.pop();
		log.warn("Stack pop state = "+ x);
		input.setProperty("bespreviousstate", "previousstate", x);
	} catch (ClientException e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	}
  return input; 
}    
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;@Operation(id=PushBESState.ID, category=Constants.CAT_EXECUTION_STACK, label="PushBESState", description="")
public class PushBESState {&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;@In (value="#{bESStateStack}",create=true)
BESStateStack&amp;lt;String&amp;gt; stack;

public static final String ID = "PushBESState";


private static final Log log = LogFactory.getLog(PushBESState.class);



@OperationMethod
public DocumentModel run(DocumentModel input) {
	
   try {
	   String x = (String)input.getProperty("bespreviousstate", "previousstate");
	   log.warn("state = "+ x);
	   stack.push(x);
} catch (ClientException e) {
	// TODO Auto-generated catch block
	e.printStackTrace();
}
   return input;
   
}    
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;}&lt;/P&gt;</description>
    <pubDate>Wed, 28 Mar 2012 23:15:57 GMT</pubDate>
    <dc:creator>karl_harris_</dc:creator>
    <dc:date>2012-03-28T23:15:57Z</dc:date>
    <item>
      <title>Custom automation with Seam backing Bean, How long is the SEAM conversation?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/custom-automation-with-seam-backing-bean-how-long-is-the-seam/m-p/323154#M10155</link>
      <description>&lt;P&gt;I'm attempting to implement a stack which will be available during a long running SEAM conversation. I want to be able to backtrack through the lifecycle states of a document and I'm using the stack to store the previous N states as Strings. The document moves through the lifecycle states and reveals, in the edit view, properties for editing based on the lifecycle state. One of the questions I have is "how long" does the SEAM conversation stay active for a document being edited?&lt;/P&gt;
&lt;P&gt;I've built a simple push and pop automation operations which load and are called correctly. The backing bean was generated using the IDE as a SEAM service bean. I changed the Scope in that bean from event to CONVERSATION.&lt;/P&gt;
&lt;P&gt;The Stack itself is a standard Java stack extended to change the name only.&lt;/P&gt;
&lt;P&gt;I get an null pointer error on the stack reference when I try a PUSH a string onto this custom stack. I am injecting a reference to the stack into the push and pop automation operation classes . It seems the SEAM backing bean is not being initialized.&lt;/P&gt;
&lt;P&gt;Here is the backing bean code and the push and pop classes: The two log messages are never printed in the backing bean, the Push log message getting the previous state from the Document Model prints.&lt;/P&gt;
&lt;P&gt;@Name("bESStateStack")
@Scope(ScopeType.CONVERSATION)
public class BESStateStackBean implements Serializable {&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;private static final long serialVersionUID = 1L;

protected BESStateStack&amp;lt;String&amp;gt; bESStateStack;



private static final Log log = LogFactory.getLog(BESStateStackBean.class);



@Unwrap
public BESStateStack&amp;lt;String&amp;gt; getService() throws Exception {
	log.warn("Getting Service BESStateStackBean");
    if (bESStateStack == null) {
    	log.warn ("Creating BESStateStackBean");
        bESStateStack = Framework.getService(BESStateStack.class);
    }
    return bESStateStack;
}



public BESStateStack&amp;lt;String&amp;gt; getbESStateStack() {
	return bESStateStack;
}



public void setbESStateStack(BESStateStack&amp;lt;String&amp;gt; bESStateStack) {
	this.bESStateStack = bESStateStack;
}
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;@Operation(id=PopBESState.ID, category=Constants.CAT_EXECUTION_STACK, label="PopBESState", description="")
public class PopBESState {&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;public static final String ID = "PopBESState";

@In (value="#{bESStateStack}")
BESStateStack&amp;lt;String&amp;gt; stack;

private static final Log log = LogFactory.getLog(PopBESState.class);



@OperationMethod
public DocumentModel run(DocumentModel input) {
	try {
		String x = (String)stack.pop();
		log.warn("Stack pop state = "+ x);
		input.setProperty("bespreviousstate", "previousstate", x);
	} catch (ClientException e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	}
  return input; 
}    
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;@Operation(id=PushBESState.ID, category=Constants.CAT_EXECUTION_STACK, label="PushBESState", description="")
public class PushBESState {&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;@In (value="#{bESStateStack}",create=true)
BESStateStack&amp;lt;String&amp;gt; stack;

public static final String ID = "PushBESState";


private static final Log log = LogFactory.getLog(PushBESState.class);



@OperationMethod
public DocumentModel run(DocumentModel input) {
	
   try {
	   String x = (String)input.getProperty("bespreviousstate", "previousstate");
	   log.warn("state = "+ x);
	   stack.push(x);
} catch (ClientException e) {
	// TODO Auto-generated catch block
	e.printStackTrace();
}
   return input;
   
}    
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;}&lt;/P&gt;</description>
      <pubDate>Wed, 28 Mar 2012 23:15:57 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/custom-automation-with-seam-backing-bean-how-long-is-the-seam/m-p/323154#M10155</guid>
      <dc:creator>karl_harris_</dc:creator>
      <dc:date>2012-03-28T23:15:57Z</dc:date>
    </item>
    <item>
      <title>Re: Custom automation with Seam backing Bean, How long is the SEAM conversation?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/custom-automation-with-seam-backing-bean-how-long-is-the-seam/m-p/323155#M10156</link>
      <description>&lt;P&gt;I think the seam conversation timeout is 30 minutes but it was fixed recently and was previously sets to 3minutes.
See : NXP-9022 - &lt;A href="https://jira.nuxeo.com/browse/NXP-9022" target="test_blank"&gt;https://jira.nuxeo.com/browse/NXP-9022&lt;/A&gt;
Version fixed : 5.4.1-HF17, 5.4.2-HF19, 5.5.0-HF05, 5.6&lt;/P&gt;</description>
      <pubDate>Thu, 29 Mar 2012 10:22:22 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/custom-automation-with-seam-backing-bean-how-long-is-the-seam/m-p/323155#M10156</guid>
      <dc:creator>chapurlatn_</dc:creator>
      <dc:date>2012-03-29T10:22:22Z</dc:date>
    </item>
    <item>
      <title>Re: Custom automation with Seam backing Bean, How long is the SEAM conversation?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/custom-automation-with-seam-backing-bean-how-long-is-the-seam/m-p/323156#M10157</link>
      <description>&lt;P&gt;It's defined in nuxeo-services &amp;gt; /nuxeo-platform-web-common/src/main/resources/OSGI-INF/deployment-fragment.xml&lt;/P&gt;
&lt;P&gt;I think you can override it by creating your own deployment-fragment.xml and redefining &lt;STRONG&gt;"components#SEAM_CORE_MANAGER"&lt;/STRONG&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;extension target="components#SEAM_CORE_MANAGER" mode="replace"&amp;gt;
    &amp;lt;property name="conversationTimeout"&amp;gt;180000&amp;lt;/property&amp;gt;&amp;lt;!-- should be 30 min but is 3 min !! --&amp;gt;
    &amp;lt;property name="concurrentRequestTimeout"&amp;gt;1000&amp;lt;/property&amp;gt;&amp;lt;!-- 1s --&amp;gt;
&amp;lt;/extension&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 29 Mar 2012 10:28:02 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/custom-automation-with-seam-backing-bean-how-long-is-the-seam/m-p/323156#M10157</guid>
      <dc:creator>chapurlatn_</dc:creator>
      <dc:date>2012-03-29T10:28:02Z</dc:date>
    </item>
  </channel>
</rss>

