File name set to GUID in ACCE and FEM

We have use a entry template to add files to Content engine and found a serious administrative issue in  some of the Document classes. In it the GUID will be set to the document title irrespective of  given document name .However document title can be properly seen at the Workplace XT and Navigator.
Acce error

 

CRBook Folder

Frist,I thought this is a error due to security permission  .And try  to simulate the error with different security permission However ,With the support of PMR team  ,We able to identify the reason  for error with property templates .

Please Fallow the following Steps

  1.  Right click on your document class (e.g., “Loan”) in FEM,
  2. select the Property Definitions tab and check the “Inherited Properties” and “System Properties” checkboxes to show these properties.
  3. Click on the “Document Title” property and select Edit.
  4. Then click on the More tab.
  5. select the “Name Property” checkbox, click OK.

doctitle

Customize Styles in IBM Content Navigator

Its a major issue we face desktop wide styles within content navigator. We need to change the labels and Font Color of the Read only fields based on customer requirement and  I was looking at the better way to achieve without changing step processor files. Our consultant  Anand Ayer guide us  to achieve it .Appreciate him a lot.

The Style Sheet plugin enable to add customization specific to Theme. Following is the way to achieve it .

Untitled

In here we have to Create a new Plugin with  stylesheet.css file.

In the Style Class  you can define  Required custom style using the theme ID as a prefix for the default css apply.

For an example the default style for text areas will be as fallows.

.dijitSelect input, .dijitTextBox input {
padding: 1px 1px 2px;
}

In order to change default style , we need to add the prefix of the theme  to default plugin and add to the custom style sheet like below .

.CustomTheme .dijitSelect input, .dijitTextBox input {
padding: 1px 1px 2px;
}

Integrate Search Templates within Workflow

only initial attachment already know there can be many  documents we uploaded to Content Engine but we can attachment while workflow intonation  to display within the workflow.

 

 

However We can attach any other document to workflow ,by using search template and display it in the  workflow using component.

 

First We need to Create the Search Object from WorkPlaceXT. Advanced Tools >> Search Designer Search Template Design

You can see the search from all search in Object Store as well as the Folder it saved.

test Serch working

Locate the saved Object from FEM and go to properties.

serchlocation

Go to Content Elements >> and Select UIContent.xml >> View and identify the item ID’s of Search Parameters . This is identified by the XMl with Were clause which indicated like below.Here Item ID’s is 7.

content Eliments

<eq><whereprop editproperty=”editable” itemid=”7″ name=”CaseID” objecttype=”document” symname=”CaseID”><propdesc datatype=”typestring” haschoices=”false” hasmarkings=”false” symname=”CaseID”/></whereprop><literal/></eq></where>

 

UIContnetPrmaetors

Go to the Workflow you have Created.In Workflow porpoises sections, Go to attachments and  define the the crated object.

WorkflowPopertiesAttachment

Create a CE Operation object and select “SearchForMany” operation and  provide following parameters.

SearchObject

object type : “document”

itemIDs : “7”  << value taken from where in UI.xml

Values : “<Workflow Propriety Name>”  this will give the dynamic value for the property

return_value :  the attachments returned will be taken to here. This can be used within the Workflow as a separate attachment to display returned attachments.

Transfer Data Within the Step Processor UI’s

I found it difficult to Set a CaseID in Step Processor to the Document Add UI.  Because Client  required to set that value when adding a document .I had to put enormous effort  like searching  clinetContext Javascript array.However using Property editor I able to achieve it .Here are the technical steps followed .

Capture1

I have created property editor in the to get the CaseID value  which trigger @ workitem properties  response filter

—————————————————————-java file

String value = criteriaObject.get(“value”).toString();
System.out.println(“CaseID value :: ” + value);
criteriaObject.put(“propertyEditor”, “filterPluginDojo/eduPropertyEditorSetCaseID”);

————————————————————– js file

postCreate: function() {
this.inherited(arguments);
// Remove the base class from the domNode
domClass.remove(this.domNode, this.baseClass);
domClass.add(this.domNode, “eduPropertyEditorSetCaseID”);

this.logInfo(“Post Create edupropeditor”,this.value);
this.logInfo(“Post Create edupropeditor Case ID”,this.values[0]);
window.caseid=this.values[0]; // get the case Id to the window property
},

 

Capture2

The other property editor will be fired @ the document openclass event  response filter .At the button click event the widow object value will be assessed and set the value to CaseiD property.

—————————————————————-java file

String templateName = request.getParameter(“template_name”);
System.out.println(“templateName” + templateName);

JSONArray properties = (JSONArray)jsonResponse.get(“criterias”);
for (int i = 0; i < properties.size(); i++)
{
JSONObject jsonPropDef = (JSONObject)properties.get(i);
String name = (String)jsonPropDef.get(“name”);
System.out.println(“templateName CaseID prpoerty” + name);
if ((name != null) && (name.equals(“CaseID”)))
{
jsonPropDef.put(“propertyEditor”, “filterPluginDojo/eduPropertyEditorCaseID”);
}
}

————————————————————– js file

_buttonClick: function(evt) {
this.logInfo(“Event log 2”,window.caseid);
this.set(“value”, window.caseid);
},

Navigator Assign Item for Particular User

Content Navigator Allows for easy Popup window to user Pickup and Assign particular case to a User Personal In Basket.Within the Workflow you have to define .

The Work Queue (CFVG ) will make available to visible @ particulate step by making it to Selected Parameters .The subsequent Step make Personal Queue with CFVG.

WoflowUserQueue

 

Within Navigator  Work Queue (CFVG ) will be displayed as follows and after submitting in that step,it will go to personal in basket .

Add User To Queue

Content Navigator ECM user Object Email

According to the reference SelectUserGroupDialog Widget Use the ecm.model.User Which has the email Attribute @ class level.However When it come to Content Foundation ,The Email will not able to retrieve to Navigator UI level ,Although it is correctly configured with Active Directory.

 

email

https://www.ibm.com/developerworks/community/forums/html/topic?id=7156ee7f-b14c-4067-9ef9-03c502771f09&ps=25

We have Discuss the issue in DeveloperWorks and there is solution to develop the customization using response filter.

Response Filter Utilise following  Services :   /p8/getDirectories,/p8/findUsers,/p8/findGroups

The special program has written to communicate with AD using LDAP connection and retrieve the email by passing the username.Retrieved Email  will be in added to json response .

String emailAdd = getUserEmail(displayName,ldapContext);
jsonPropDef.put(“emailAddress”, emailAdd);

Just adding to response will not display the email in the UI tool tip .After a significant effort we able to display it as above using fallowing steps.

SelectUserGroupDialog , _createRendering method has overided with a custom code . The tooltip section having the custom code indicated .

 

_createRendering: function(repository) {

………….

this._selector = new UserGroupSelector({

queryMode: “all”,
selectionMode: “extended”,
_showTooltip: function(event, grid) {
var item = grid.getItem(event.rowIndex);
if (item) {
var toolTip = [];
//alert(“Tooltip”);
toolTip.push(”

” + idxHtml.escapeHTML(this._messages.display_name) + “ “);
toolTip.push(““);
toolTip.push(has(“dojo-bidi”) ? this.enforceTextDirWithUcc(null, idxHtml.escapeHTML(item.displayName)) : idxHtml.escapeHTML(item.displayName));
toolTip.push(“

“);
toolTip.push(”

” + idxHtml.escapeHTML(this._messages.name) + “ “);
toolTip.push(““);
toolTip.push(has(“dojo-bidi”) ? this.enforceTextDirWithUcc(null, idxHtml.escapeHTML(item.name)) : idxHtml.escapeHTML(item.name));
toolTip.push(“

“);
toolTip.push(”

” + idxHtml.escapeHTML(this._messages.shortName) + “ “);
toolTip.push(““);
toolTip.push(has(“dojo-bidi”) ? this.enforceTextDirWithUcc(null, idxHtml.escapeHTML(item.shortName)) : idxHtml.escapeHTML(item.shortName));
toolTip.push(“

“);
toolTip.push(“

“+idxHtml.escapeHTML(“emailAddress : “)+”“);

toolTip.push(““);
toolTip.push(has(“dojo-bidi”) ? this.enforceTextDirWithUcc(null, idxHtml.escapeHTML(item.emailAddress)) : idxHtml.escapeHTML(item.emailAddress));
toolTip.push(“

“);
Tooltip.show(toolTip.join(“”), event.cellNode, [
“after”,
“before”,
“above”,
“below”
], !this.isLeftToRight(), this.textDir);//38360 toolTip.push(has(“dojo-bidi”) ? this.enforceTextDirWithUcc(null, idxHtml.escapeHTML(item.displayName)) : idxHtml.escapeHTML(item.displayName));

}
},

 

………..

}

 

 

 

 

Change Document Property to Text Area

It is common that the user requirement where changing some of the document fields to text areas,, I understand such still some time i could find successful way ,, With the help of friend and Sample plugin We achieve it easily as follows.

Thanks  goes to  :   http://dw.developer-works.com/article/10236920/Override+Display+on+text+box

 

changetotextarea

You can retrieve  the sample plugin referring to following codes. Upload it  following the same procedure you followed to other plugin

http://www-01.ibm.com/support/knowledgecenter/SSEUEX_2.0.2/com.ibm.developingeuc.doc/eucdv001.dita

Go the FEM or ACCE and locate the  property template you need to make it as Test area .Change the value of Maximum String Length to 500.After cache clearing  the text area will get appeared .

Iterate through Filenet Array Object 

When I started to work with multiple value document  properties , I had to assign them to array objects within workflow .To Retrieve value from them array need to be iterate,where I could not find a direct object in filenet to achieve this . I had to use the basic concept of Programming and implement items need to iterate as follows .

 

iteration

 

In here, I have performed  values of the NewSubCategoryAlignment  will be assigned to SubCategoryAlignment array. I have used  two integer type variables  NewSubCatAligmentloop (0) and NewSubCatAlignemtCount (NewSubCategoryAlignment   array element count ) which get there inital value @ Lunch Step.

 

initalstep

 

Iteration Happen using two activity steps , where Increment activon will increase the value of the NewSubCatAligmentloop if the condition to exhit from the loop not satisfied.

NewSubCatAligmentloop = NewSubCatAligmentloop+1

Increment

Within the action activity step following actions will be triggered ,

SubCategoryAlignment[NewSubCatAlignemtCount+NewSubCatAligmentloop]  =NewSubCategoryAlignment[NewSubCatAligmentloop]

Route [1] condition will be to exist from the loop – NewSubCatAligmentloop > NewSubCatAlignemtCount

Route[2] condition to iterate trough the loop –  NewSubCatAligmentloop <= NewSubCatAlignemtCount

Filenet Multi-Value Selection Fields

The Filenet Ordered or Unordered List  Allows to improve the user Experience , in Which The multiple selections are  possible to carry out from UI level.

lists

 

When you are going through the process of Property definition there are two options , Non Unique ordered Values and Unique Unored Values .

As Follows Unique List does  not allow to select Duplicate Values . If you need ordering you can do it from EDS level if you bind values from the EDS table.

Navigator

 

EDS Query : SELECT EDS_OBJECT.OBJECTTYPE,EDS_OBJECT.PROPERTY,EDS_OBJECT.DISPMODE,EDS_OBJECT.REQUIRED,EDS_OBJECT.HIDDEN,EDS_OBJECT.MAXVAL,EDS_OBJECT.MINVAL,EDS_OBJECT.MAXLEN,EDS_OBJECT.FORMAT,EDS_OBJECT.FORMATDESC,EDS_OBJECT.HASDEPENDANT,EDS_OBJECT.LABEL,EDS_OBJECT.DEPENDENTON,EDS_OBJECT.DEPENDENTVALUE,EDS_CHOICES.LISTDISPNAME,EDS_CHOICES.DISPNAME,EDS_CHOICES.VALUE,EDS_CHOICES.DEPON,EDS_CHOICES.DEPVALUE FROM EDS_OBJECT EDS_OBJECT LEFT JOIN EDS_CHOICES EDS_CHOICES ON EDS_OBJECT.OBJECTTYPE=EDS_CHOICES.OBJECTTYPE AND EDS_OBJECT.PROPERTY=EDS_CHOICES.PROPERTY AND EDS_CHOICES.LANG='” + locale + “‘” + ” where ” + “EDS_OBJECT” + “.OBJECTTYPE='” + objectType + “‘” + ” ORDER BY ” + “EDS_CHOICES” + “.LISTDISPNAME ASC, EDS_CHOICES.DISPNAME ASC

We have Order it in two levels ,So choices will be ordered based on display pame.

FileNet File and Move Method

The File and Move are the greatest set of Methods within IBM Filenet P8  ,which can be used to may marvalous creations .

 

file

 

movemethod

Referring to the link  :https://www-304.ibm.com/support/knowledgecenter/SSNW2F_5.2.0/com.ibm.p8.pe.dev.java.ceops.doc/filenet/contentops/ContentOperations.html

    • file(filenet.vw.api.VWAttachment sourceDocument, filenet.vw.api.VWAttachment destFolder)

      Files a document attachment, currently existing in a repository, into a specified destination folder.

File allows to  show a document within objectstore,  many locations without copying the file  just as the reference .Further it  will not show multiple files when document searching ,although we can see it more than one folder.

    • move(filenet.vw.api.VWAttachment folder, filenet.vw.api.VWAttachment object)

      Moves the specified document or custom object from its existing folder to the specified folder (similar to an unfile and file operation).

Base on the requirement We had to create folders and File the Document on them.  First  I use the File method and show it in intended folders ,Then Based on requirement since I cannot keep the document in the Original uploaded location I use move method.

However after trying lot of time ,It seem that , File method not working properly ,However after thorough investigation We able to find that moving original file will  change the original file location.

So that the change in the reference  document will going to lose all the implementation with file method ,which need to handle by the developer .