[Powershell]AX 사용자 관리

Posted by Alvin You
2014. 8. 17. 23:58 Dynamics AX

MS가 UNIX 환경의 Shell 환경처럼 많은 Command들을 이용해서 시스템을 관리할 수 있도록 발표한 것이 Powershell 일 것입니다.

Windows 관리에만 사용되던 Powershell을 AX 설치 후 추가된 Microsoft Dynamics AX 2012 Management Shell을 통해서 AX관리에 Powershell을 사용할 수 있습니다.

오늘은 AX 사용자와 관련된 몇 가지 Command를 다뤄 볼 생각입니다.

1. AD(Active Directory) 사용자 및 AX User 생성

New-AXUser -AccountType WindowsUser -AXUserId Alvin –UserDomain "ZSP" -PartitionKey initial Enabled -UserName Alvin -Company ZSPK

2. 사용자 계정 Disable 처리

Disable-AXUser –AXUserId Alvin

3. 사용자 계정에 Role 연결

Add-AXSecurityRoleMember –AxUserId Alvin –AOTName -SYSADMIN-

Korea AX User Group을 만들었습니다.

Posted by Alvin You
2014. 8. 12. 23:46 Dynamics AX

많은 국가에서 AXUG(AX User Group)을 만들어 AX 사용자들간에 정보 교류를 하는 것을 보고, 제가 국내 AX User Group을 만들었습니다.

 

네이버 블로그에 관련 카페를 만들었으며, AXUG 도메인을 등록해 카페 접속을 손쉽게 할 수 있도록 했으니 많은 AX 사용자 또는 관심 있으신분들의 회원 가입 부탁 드리겠습니다.

 

Korea Dynamics AX User Group : http://www.axug.co.kr

 

아직은 컨텐츠가 많이 부족하지만 제 개인 블로그에 있는 내용들이라도 퍼 나르도록 하겠습니다.

 

감사합니다.

X++에서 XML 파일로 데이터 저장하고 읽기

Posted by Alvin You
2014. 8. 2. 09:35 Dynamics AX/Development

오늘은 AX의 데이터를 XML 파일로 저장 후 다시 데이터를 읽어 오는 샘플 코드를 보여 드릴까 합니다. 외부 시스템과의 데이터 교환을 DB-To-DB 형태로 교환 할 수도 있지만, 특정 시스템들은 XML 파일로 주고 받을 수 있기 때문에 시스템 구축시 아래 코드가 도움이 되었으면 좋겠습니다.

  • VendTable에서 데이터를 읽어와 vendList.xml 파일로 저장

static void ZSPK_CreateXMLFile(Args _args)

{

XmlDocument doc;

XmlElement nodeXml;

XmlElement nodeTable;

XmlElement nodeAccount;

XmlElement nodeName;

VendTable vendTable;

Filename fileName;

int i;

#WinAPI

;

 

doc = XmlDocument::newBlank();

nodeXml = doc.createElement('xml');

doc.appendChild(nodeXml);

 

while select vendTable order by vendTable.AccountNum

{

i++;

nodeTable = doc.createElement(tableStr(VendTable));

nodeTable.setAttribute(fieldStr(VendTable, RecId), int642str(vendTable.RecId));

nodeXml.appendChild(nodeTable);

 

nodeAccount = doc.createElement(fieldStr(VendTable, AccountNum));

nodeAccount.appendChild(doc.createTextNode(vendTable.AccountNum));

nodeTable.appendChild(nodeAccount);

 

nodeName = doc.createElement(fieldStr(vendTable, ZSPK_Name));

nodeName.appendChild(doc.createTextNode(vendTable.ZSPK_Name));

nodeTable.appendChild(nodeName);

 

if (i == 5) break;

}

 

fileName = WinAPI::getFolderPath(#CSIDL_PERSONAL);

fileName += '\\vendList.xml';

doc.save(fileName);

info("완료");

}

 

  • vendList.xml 파일을 읽어오는 코드 샘플 코드

static void ZSPK_DataSetRead(Args _args)

{

System.Data.DataSet dataSet;

System.Data.DataTableCollection dataTableCollection;

System.Data.DataTable dataTable;

System.Data.DataRowCollection dataRowCollection;

System.Data.DataColumnCollection dataColumnCollection;

System.Data.DataRow dataRow;

System.Data.DataColumn dataColumn;

int i,j,TotalCol,TotalRow;

str _xml;

;

 

dataSet = new System.Data.DataSet();

dataSet.ReadXml(@"C:\Users\Administrator\Documents\vendList.xml");

dataTableCollection = dataSet.get_Tables();

dataTable = dataTableCollection.get_Item(0);

dataColumnCollection = dataTable.get_Columns();

dataRowCollection = dataTable.get_Rows();

TotalRow = dataRowCollection.get_Count();

TotalCol = dataColumnCollection.get_Count();

 

for (i=0;i < TotalRow; i++)

{

dataRow = dataRowCollection.get_Item(i);

//setprefix(CLRInterop::getAnyTypeForObject(DataRow.get_item(i)));

for (j=0;j < TotalCol; j++)

{

//dataRow = dataRowCollection.get_item(i);

if (dataRow.IsNull(j))

_xml = 'null';

else

_xml = dataRow.get_Item(j);

 

info(strFmt("%1 - %2 - %3", i, j, _xml));

}

}

 

}

 

사용자가 Session Date 변경을 못하도록 권한 빼기

Posted by Alvin You
2014. 7. 30. 23:31 Dynamics AX

오늘은 Dynamics AX에서 과거 날짜의 Transaction Data를 발생시키기 위한 방법 중 하나인 File > Tools > Session date and time 메뉴에 대한 권한을 막는 방법에 대해서 설명해 드리겠습니다.

특정 권한을 가진 Key User(Power User)에게만 권한이 주어지면 좋겠지만 System User Role이라는 가장 기본적인 Role에 해당 권한이 들어가 있어 모든 사용자가 아래와 같은 날짜 변경 화면을 사용할 수 있도록 되어 있습니다.

 

결론을 말씀 드리면, Session Date and time 메뉴의 Entry Points인 SystemDate가 속한 ClientEssentials Privileges에서 해당 Entry Points를 빼고 새롭게 만든 Privileges에 해당 Entry Points를 넣으면 System User Role에 해당하는 일반 사용자에게서 해당 권한이 빠지게 됩니다.

Role

Duty

Privileges

Entry Points

System User

  

  

  

  

SysServerAXBasicMaintain

  

  

  

  

ClientEssentials

  

  

  

  

SystemDate

 

ERP 시스템에서 중요하게 다루어져야 하는 Transaction Date에 대해서 생각해 봤습니다.

X++에서 직접 SQL 실행하기

Posted by Alvin You
2014. 7. 29. 20:17 Dynamics AX/Development

X++에서 직접 SQL을 실행시키는 코드는 아래 내용을 참고 하시면 됩니다.

static void getCustomersDirectSQL(Args _args)

{

Connection userConnection;

Statement stmt;

str sqlString;

ResultSet rs;

;

 

userConnection = new Connection();

stmt = userConnection.createStatement();

sqlString = 'select * from custTable';

new SqlStatementExecutePermission(sqlString).assert();

rs = stmt.executeQuery(sqlString);

CodeAccessPermission::revertAssert();

 

while(rs.next())

{

// print rs.getString(1);

info(rs.getString(1));

}

}

Job에서 직접 코딩 후 실행시키면 아래와 같은 에러창이 뜨면서 실행이 되지 않습니다.

해당 코드는 Server 환경에서 실행되어야 하는데 Job에서는 해당 내용을 지시할 수 없어 아래 그림과 같이 Action Menu를 만들어 Run On 속성에서 Server를 지정해 주신 후 Action Menu를 실행시키시면 됩니다.

실행 결과 :

The WCF subset supported by NetCF

Posted by Alvin You
2014. 7. 24. 23:24 Dynamics AX

Dynamics AX 2012와 산업용 PDA의 연계 작업을 진행하면서 부딪힌 .NET Compact Framework의 한계 ㅎㅎ

아래 내용은 Desktop WCF와 Compact WCF간의 차이를 보여주는 내용입니다.

 

http://blogs.msdn.com/b/andrewarnottms/archive/2007/08/21/the-wcf-subset-supported-by-netcf.aspx

 

[Updated: 21Nov07 to clarify that custom headers are supported, but not in NetCFSvcUtil proxy generation]
[Updated: 27Aug07 to correct Gzip sample, and clarify on transports & extensibility]
[Updated: 23Aug07 to add SecurityAlgorithmSuite enumerable]

Many people have been asking about what subset of .NET 3.0's Windows Communication Foundation (WCF) will be supported by the .NET Compact Framework 3.5.  Well, here is a table I put together with the answer to that question:

Feature

Desktop WCF

Compact WCF

Bindings:    
· BasicHttpBinding Yes Yes
· CustomBinding Yes Yes
· WindowsMobileMailBinding N/A Yes
· ExchangeWebServiceMailBinding Yes, via NetCF install Yes
Formatters:    
· SoapFormatter Yes Yes
· BinaryFormatter Yes No
Encoders:    
· TextMessageEncoder Yes Yes
· BinaryMessageEncodingBindingElement Yes No
· MTOMEncoder Yes No
· GzipEncoder Sample available Sample available
Transports:    
· HttpTransportBindingElement Yes Yes
· HttpsTransportBindingElement Yes Yes
· MailTransportBindingElement Yes, via NetCF install Yes
· MsmqTransportBindingElement Yes No
· TcpTransportBindingElement Yes No
· (other transports) Yes No
XmlDictionaryReader/Writer Yes Yes; stub around XmlTextReader/Writer
DataContractSerializer Yes No; but can be wire-compatible with DCS via XmlSerializer
Service proxy generation Yes; via SvcUtil.exe Yes; via NetCFSvcUtil.exe, not integrated into VS2008
· Non-HTTP transports in generated proxies Yes Not built-in
· Custom headers in generated proxies Yes Not built-in
WS-Addressing Yes Yes
WS-Security message level security    
· X.509 Yes Yes
· Username/password Yes No
· SecurityAlgorithmSuite.Basic256Rsa15 Yes Yes
· SecurityAlgorithmSuite.Basic256 Yes No
WS-ReliableMessaging Yes No
Patterns    
· Service model Yes No
· Message layer programming Yes Yes
· Buffered messages Yes Yes
· Streaming messages Yes No
· Endpoint descriptions in .config files Yes No
Channel extensibility Yes Yes
Security channel extensibility Yes No

Enterprise Portal의 Listpage 표시행 수 조정하기

Posted by Alvin You
2014. 7. 23. 15:25 Dynamics AX

AX의 Enterprise Portal의 List Page의 표시되는 행수를 셋팅할 수 있는 곳은 아래 이미지의 경로인 System administration > Setup > Enterprise Portal > Enterprise Portal Parameters의 General항목에서 조정할 수 있습니다.

하지만, 위 이미지와 같이 0 ~ 100 사이가 아닌 숫자를 넣게되면 기본적으로 10개가 표시되도록 내부적으로 기본값 셋팅이 되어버립니다.

이것을 설정한 값이 그대로 Listpage에 표시되도록 하기 위해서는 AOT 환경에 들어가

Data Dictionary > Tables > EPGlobalParameters > Methods 에 있는 rowsDisplayedinListPage() 의 내용 중 아래 내용을 주석 처리하면 됩니다.

// set the return value to the default if it is an invalid value

    if (rowsDisplayed < 0 || rowsDisplayed > 100)

    {

        rowsDisplayed = 10;

    }

 

TCO,ITIL,CMM,CobiT,6Sigma등에 대한 간략한 설명

Posted by Alvin You
2014. 6. 16. 22:44 분류없음

Total Cost of Ownership (TCO): A Gartner cost optimization and investment justification model that captures the true cost of sustaining an IT asset throughout its useful life. The TCO product/service suite includes a financial model, a methodology, consulting services, best practices and software tools for understanding not only the initial acquisition cost, but the support, maintenance and disposal costs of an asset as it ages. TCO is particularly useful for managing obsolescence, optimizing asset utilization, justifying reinvestment in infrastructure, and finding hidden costs embedded in non-IS-organizational units.

   

Information Technology Infrastructure Library (ITIL): A well-established, easily accessible, affordable process model for IT service management that is built around a set of best practices. ITIL bundles IS core process definitions into integrated, published sets. ITIL's structure enables incremental adoption, which facilitates continuous improvement. A well-established service and consulting industry has been built around ITIL, especially in Europe. ITIL is better known for its back-office operational process definitions than for its application management processes.

   

Capability Maturity Model (CMM): An IS process and performance improvement framework that has emerged as a de facto standard for application development and maintenance processes. The CMM is highly prescriptive because it provides diagnostics for assessing an organization's performance on a maturity scale, and it defines objective criteria for reaching subsequent maturity levels. It also captures the processes and process outcomes that are relevant to those maturity levels. However, it does not provide "how to" information. That is, it helps IS organizations identify where they are and what their next goals should be, but does not address how to get there.

   

Control Objectives for Information and Related Technology (CobiT): A standardized set of guidelines establishing which formal IS processes, practices and controls should be in place and the minimum results they should predictably deliver. CobiT is used predominantly by independent auditors to authenticate the integrity, reliability and security of IT systems and data. Its orientation is risk mitigation. To achieve this, it presents a comprehensive checklist of all IS processes and controls, and establishes guidelines for acceptable performance. CobiT is useful for understanding the universe of IS processes and establishing initial performance targets, but it does nothing to support the goals of continuous improvement or IS service optimization, and the cost of achieving the prescribed level of risk mitigation can potentially exceed the benefit.

   

Six Sigma: A philosophy and method for improving process outcomes by establishing acceptable levels for defects and modifying processes until the defect level is achieved. Six Sigma is "process-agnostic"; it does not matter which processes are being modified or which outcomes are being monitored. Six Sigma is a generic technique for understanding how to conduct and achieve process improvement while keeping an eye on quality outcomes. As such, it is fairly pragmatic and potentially quite relevant to the execution of process improvement goals. However, because Six Sigma originated in the manufacturing sector, there is an ongoing debate concerning its relevance to service industries and organizations. IS organizations that adopt Six Sigma will likely need to modify it.

   

ISO 9000: A standard for achieving predictability and repeatability in processes. ISO 9000 is generic and essentially assumes that predictable results mean good results. An organization can be ISO 9000-compliant if it adheres to its documented practices, even though those practices may not produce results that are consistent with even-baseline peer group performance, let alone best-practice performance levels. ISO 9000 introduces discipline and rigor into an environment, but does not support continuous improvement goals or guarantee acceptable levels of performance.

   

National Awards (such as the Malcolm Baldrige Award): Self-assessment programs for performance improvement sponsored by different countries. These national awards for performance excellence are granted based on criteria such as leadership, process management and business results. These programs provide a consistent framework for defining quality and assessing improvements across a holistic set of drivers (not just process), but they do not provide guidelines on how to achieve quality objectives and improvements.

   

Scorecards: Reporting and monitoring tools designed to provide a focused, balanced insight into performance by measuring the variables that directly affect required outcomes. Scorecards are generally articulated in business terms by using easily understood measures, such as financial results or customer satisfaction. However, they lack a universal, formally defined structure, content or definition. This absence of standards often means that scorecards are employed to monitor and report things that sound important, without ultimate objectives or causal relationships being defined or understood. This renders them impractical for external comparison, and sometimes limits their roles to reliable communication tools, rather than devices that produce desired outcomes.

다시 일상으로 복귀

Posted by Alvin You
2014. 6. 5. 22:48 밑줄 한줄

4월부터 시작했던 육아와 같이 병행했던 Part-time job이 마무리가 되어 이제는 육아에 전념할 수 있게 되었습니다.

아기를 키우며 다른 무엇인가를 같이 진행한다는게 얼마나 힘든일인지 다시 한 번 깨달을 수 있었던 시간이었습니다.

'밑줄 한줄' 카테고리의 다른 글

생각대로 살지 않으면 사는 대로 생각하게 된다  (0) 2014.03.21
프로페셔널  (0) 2013.10.12
일단 부딪쳐 본다  (0) 2013.10.12

ACS/BOCS를 이용한 Documentum 분산환경

Posted by Alvin You
2014. 4. 16. 16:50 DOCUMENTUM
  1. BOCS 구성에 필요한 서버 모듈
    1. Content Server
    2. Documentum Messaging Server(DMS)
    3. Branch Office Caching Services(BOCS)
    4. Documentum Administrator(DA)
  2. 분산 환경 테스트 구성
    1. Lenovo T61에 Windows 2003 Server + CS + DMS + DA 설치
    2. VMWare에 Windows 2003 Server + BOCS 설치
    3. VMWare에 Windows XP + jre-6u17-windows-i586.exe 설치(UCF Client에서 JRE가 필요하기 때문에)
  3. 분산 환경 설치 및 기본적인 환경 설정에 관련된 내용은 아래 문서 참조
    1. Distributed_Content_Configuration_And_Troubleshooting.pdf
    2. Documentum Content Server 6.5 Distributed Configuration Guide.pdf
    3. Documentum_BOCS_65_SP1_release_notes.pdf
  4. ?:/Documentum/jboss4.2.0/server/DctmServer_MethodServer/deploy\acs.ear/APP-INF/classes/config/acs.properties

    #Mon Nov 23 13:49:44 KST 2009

    bocs.pulling.interval=10

    primary.content.store.quota=1000M

    mode.cachestoreonly=false

    jms.queue.name=/queue/null

    bocs.keystore=

    mode.debug=false

    java.naming.factory.url.pkgs=org.jboss.naming\:org.jnp.interfaces

    repository.acsconfig=XN-BONGACS1

    repository.name=xn_test_rep.xn_test_rep

    bocs.pulling.mode.enabled=

    repository.login=Administrator ß Content Server 관리자 계정

    repository.password=xxxxxx ß 매뉴얼에는 Trusted Connection이기 때문에 굳이 넣을 필요가 없다고 하지만 없을 경우 정상 작동이 안됨

    proxy.port=

    policy=Throttle,1,10,0

    jms.url=jnp\://XN-BONG\:9084

    policy.1=ReplaceRequest,50,1

    proxy.host=

    dms.pulling.url=

    primary.content.store.root=C\:\\Documentum\\acsCache

    jms.connection.factory=/MethodServerQueueConnectionFactory

    bocs.configuration.name=

    tracing.enabled=false

    jndi.factory=org.jnp.interfaces.NamingContextFactory

  5. BOCS 서버의 ?:/Documentum/jboss4.2.0/server/DctmServer_BOCS/deploy/bocs.ear/APP-INF/classes/dfc.properties

    dfc.data.checkout_dir=${dfc.data.user_dir}/checkout

    dfc.data.dir=C:/Documentum/jboss4.2.0/server/DctmServer_BOCS/data/BOCS

    dfc.data.export_dir=${dfc.data.user_dir}/export

    dfc.data.user_dir=${dfc.data.dir}

    dfc.search.ecis.enable=false

    dfc.search.ecis.host=

    dfc.search.ecis.port=

    dfc.tokenstorage.dir=${dfc.data.user_dir}/apptoken

    dfc.tokenstorage.enable=false

    dfc.docbroker.host[0]=xn-bong ß Docbroker 가 있는 Host 정보

    dfc.docbroker.port[0]=1489 ß Docbroker Port 정보

  6. BOCS 서버의 ?:/Documentum/jboss4.2.0/server/DctmServer_BOCS/deploy/bocs.ear/APP-INF/classes/config/acs.properties

    mode.cachestoreonly=true

    tracing.enabled=false

    mode.debug=false

     

    #Added for jboss

    jndi.factory=org.jnp.interfaces.NamingContextFactory

    jms.url=jnp\://BOCS_SVR\:8090

    java.naming.factory.url.pkgs=org.jboss.naming\:org.jnp.interfaces

    jms.connection.factory=/BOCSQueueConnectionFactory

    jms.queue.name=/queue/bocsQueue

     

    bocs.keystore=C\:/Documentum/bocs/config/bocs.keystore

    bocs.configuration.name=BOCS_Svr ß DA(Documentum Administrator)의 분상환경 구성 요소 중 BOCS Object Name을 입력

    bocs.pulling.mode.enabled=FALSE

    dms.pulling.url=

    bocs.pulling.interval=10

     

    proxy.host=

    proxy.port=

     

    policy=Throttle,1,10,0

    policy.1=ReplaceRequest,50,1

    cache.store.root=C\:\\Documentum\\acsCache

    cache.store.quota=1000M

    primary.content.store.root=C\:\\Documentum\\primeStore

    primary.content.store.quota=1000M

 

  1. WDK 기반의 Client의 app.xml의 ACS/BOCS 관련 정보 수정(/apache-tomcat-6.0.18/webapps/da/wdk/app.xml)

<!-- Begin {D6 accelerated content transfer (ACS) settings} -->

 

<!-- <accelerated-read> :

This is for accelerated Read, and it replaces the correpsonding 5.3.x <acs> configurations.

It allows accelerated read and write to be switched on and off separately.

 

For backward compatibility, WDK D6 first looks up the <acs> tag before looking up the

<accelerated-read> tag.

-->

<accelerated-read>

<!-- when set to be "true", enables ACS, and, when optimal, BOCS read operations -->

<enabled>true</enabled>

<!-- the followings are the existing options under the 5.3.x "acs" tag -->

<attemptsurrogateget>true</attemptsurrogateget>

<maintainvirtuallinks>true</maintainvirtuallinks>

</accelerated-read>

 

<!-- <accelerated-write> :

A separate configuration block for accelerated Write

-->

<accelerated-write>

<!-- when set to be "true", enables ACS, and, when optimal, BOCS write operations -->

<enabled>true</enabled>

<!-- when set to:

1. "prohibit-async" - application doesn't allow BOCS write asynchronously

2. "default-sync" - application should see content written from BOCS to ACS synchronously by default

3. "default-async" - application should see content written from BOCS to ACS asynchronously by default

-->

<bcs-write-mode>default-sync</b霓cs-write-mode>

<!-- when set to "true", allows override of default BOCS write mode by users

(in general, it should be scoped with <filter> tag, e.g. role-based) -->

<allow-override-bocs-write-mode>true</allow-override-bocs-write-mode>

</accelerated-write>

<!-- End {D6 accelerated (ACS) content transfer settings} -->

 

  1. ACS/BOCS 구성 화면
    1. Network Location이 적용된 Login 화면

       

    2. Distributed Content 구성 화면

    3. Network Location : BOCS_loc

       

    4. ACS Servers : XN-BONGACS1

 

 

  1. BOCS Servers : BOCS_Svr

 

  1. Distributed Transfer

 

 

  1. Messaging Server

 

  1. ACS/BOCS 테스트 화면
    1. Content 등록 화면

 

 

  1. Web Client에서 컨텐츠 다운로드시 BOCS 서버의 Caching 정보 확인

    (?:/Documentum/acsCache/content/ 경로 아래로 파일이 쌓임)

     

  2. Web Client에서 컨텐츠 전송시 BOCS 서버의 Caching 정보 확인

    (?:/Documentum/primeStore/ 경로 아래로 compressed/uncompressed 폴더에 임시적으로 컨텐츠를 Writing 한 후 일정 시간이 지나면 Content Server에 전송)

'DOCUMENTUM' 카테고리의 다른 글

IDQL을 이용한 DQL 실행하기  (0) 2014.03.24
Documentum 7.0 64bit 설치  (0) 2014.03.23
DFS에서 UCF 사용하기  (0) 2014.03.21
r_object_id의 구성  (0) 2014.03.21
Documentum Client Capability  (0) 2014.03.21